Execute a generic jQuery call with a value.
@param string $jQueryCall
@param string $element
@param string $param
@param boolean $immediatly delayed if false
420410
public function _genericCallValue($jQueryCall,$element='this', $param="", $immediatly=false) {
		$element=$this->_prep_element($element);
		if (isset($param)) {
			$param=$this->_prep_value($param);
			$str="$({$element}).{$jQueryCall}({$param});";
		} else
			$str="$({$element}).{$jQueryCall}();";
			if ($immediatly)
				$this->jquery_code_for_compile[]=$str;
			return $str;
	}
114778
def element_call(precondition = nil, &block)
      caller = caller_locations(1, 1)[0].label
      already_locked = Wait.timer.locked?
      Wait.timer = Wait::Timer.new(timeout: Watir.default_timeout) unless already_locked

      begin
        check_condition(precondition, caller)
        Watir.logger.debug "-> `Executing #{inspect}##{caller}`"
        yield
      rescue unknown_exception => ex
        element_call(:wait_for_exists, &block) if precondition.nil?
        msg = ex.message
        msg += '; Maybe look in an iframe?' if @query_scope.iframe.exists?
        custom_attributes = @locator.nil? ? [] : selector_builder.custom_attributes
        unless custom_attributes.empty?
          msg += "; Watir treated #{custom_attributes} as a non-HTML compliant attribute, ensure that was intended"
        end
        raise unknown_exception, msg
      rescue Selenium::WebDriver::Error::StaleElementReferenceError
        reset!
        retry
      rescue Selenium::WebDriver::Error::ElementNotVisibleError, Selenium::WebDriver::Error::ElementNotInteractableError
        raise_present unless Wait.timer.remaining_time.positive?
        raise_present unless %i[wait_for_present wait_for_enabled wait_for_writable].include?(precondition)
        retry
      rescue Selenium::WebDriver::Error::InvalidElementStateError
        raise_disabled unless Wait.timer.remaining_time.positive?
        raise_disabled unless %i[wait_for_present wait_for_enabled wait_for_writable].include?(precondition)
        retry
      rescue Selenium::WebDriver::Error::NoSuchWindowError
        raise NoMatchingWindowFoundException, 'browser window was closed'
      ensure
        Watir.logger.debug "<- `Completed #{inspect}##{caller}`"
        Wait.timer.reset! unless already_locked
      end
    end
578366
private function _doJQuery($element, $jqueryCall, $param="", $jsCallback="", $immediatly=false) {
		$param=Javascript::prep_value($param);
		$callback="";
		if ($jsCallback!="")
			$callback=", function(event){\n{$jsCallback}\n}";
			$script="$(".Javascript::prep_element($element).").".$jqueryCall."(".$param.$callback.");\n";
			if ($immediatly)
				$this->jquery_code_for_compile[]=$script;
				return $script;
	}
1178647
public function validate_element( $element ) {
		$type = gettype( $element );
		$callable = $this->type === 'callable';
		$is_object = 'object' === $type;
		$loose_check = $this->type === 'object';

		// callable must be callable
		if ( $callable && ! is_callable( $element ) ) {
			throw new InvalidArgumentException( 'Item must be callable' );
		}

		// target isn't callable, object must be an instance of target
		if ( ! $loose_check && ! $callable && $is_object && ! is_a( $element, $this->type ) ) {
			throw new InvalidArgumentException( "Item is not type or subtype of $this->type" );
		}

		// a non callable, non object type should match the target string
		if ( ! $callable && ! $is_object && $type !== $this->type ) {
			throw new InvalidArgumentException( "Item is not of type: $this->type" );
		}
	}
1226298
function() {
            var val = element.oldValue = element.value
            if ($elem.data("duplex-observe") !== false) {
                evaluator(val)
                callback.call(element, val)
            }
        }
792049
function (element, options) {
    this.options = options
    this.$element = $(element)
      .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
    this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
  }
189200
public static void waitUntilElementIsVisible(final String elementLocator) {
        logger.entering(elementLocator);
        By by = HtmlElementUtils.resolveByType(elementLocator);
        ExpectedCondition<WebElement> condition = ExpectedConditions.visibilityOfElementLocated(by);
        waitForCondition(condition);
        logger.exiting();
    }
858166
protected void trigger(GwtEvent<?> e, Function callback, Element element) {
    trigger(e, callback, element, eventBus);
  }
103204
function emitOneElement(element, name, onLeave) {
  if (typeof element === 'object') {
    emitStart.call(this, name, element.$);
    if (__own.call(element, '$children')) {
      emitChildren.call(this, element.$children);
    } else {
      var hasText = false;
      for (var child in element) {
        if (__own.call(element, child) && child !== '$' && child != '$name') {
          if (child === '$text') {
            hasText = true;
          } else {
            emitElement.call(this, element[child], child);
          }
        }
      }
      if (hasText) {
        emitText.call(this, element.$text);
      }
    }
  } else {
    emitStart.call(this, name, element.$);
    emitText.call(this, element);
  }
  if (!onLeave) {
    emitEnd.call(this, name);
  }
}
261253
public final void call(T param)
	{
		if (!run)
		{
			run = true;
			prepared = true;

			try
			{
				this.run(param);
			}
			catch (Throwable t)
			{
				log.error("[ParamInvokeable] {prepare} : " + t.getMessage(), t);
			}
		}
	}
1137873
public function _animate($element='this', $params=array(), $speed='', $extra='', $immediatly=false) {
		$element=$this->_prep_element($element);
		$speed=$this->_validate_speed($speed);

		$animations="\t\t\t";
		if (is_array($params)) {
			foreach ( $params as $param => $value ) {
				$animations.=$param.': \''.$value.'\', ';
			}
		}
		$animations=substr($animations, 0, -2); // remove the last ", "

		if ($speed!='') {
			$speed=', '.$speed;
		}

		if ($extra!='') {
			$extra=', '.$extra;
		}

		$str="$({$element}).animate({\n$animations\n\t\t}".$speed.$extra.");";

		if ($immediatly)
			$this->jquery_code_for_compile[]=$str;
			return $str;
	}
1209554
function(e) {
	   this.hiddenEl.value = this.el.checked ? this.checkedValue : this.uncheckedValue;
	
	   inputEx.CheckBox.superclass.onChange.call(this,e);
	}
1332687
public function execute()
    {
        $locator = $this->element->getLocator();
        if (null === $this->callback) {
            throw new WebDriver_Exception("Wait callback is undefined for element '{$locator}''");
        }
        for ($i = 0; $i < $this->timeout; $i++) {
            if (call_user_func($this->callback, $this->element())) {
                return $this;
            }
            sleep(1);
        }
        $message = "Provided state of element '{$locator}' is not reached after timeout";
        $message = ($this->errorMessage == null) ? $message : "{$message} with error: {$this->errorMessage}";
        throw new WebDriver_Exception($message);
    }
624985
function(value, element, param) {
			// bind to the blur event of the target in order to revalidate whenever the target field is updated
			// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
			var target = $(param).unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
				$(element).valid();
			});
			return value == target.val();
		}
681886
public function waitUntilElementIsVisible(string $cssSelector, int $timeout = 5, TraversableElement $baseElement = null): void
    {
        $baseElement = $baseElement ?? $this->getSession()->getPage();

        try {
            $this->waitUntil($timeout, function () use ($cssSelector, $baseElement) {
                $element = $baseElement->find('css', $cssSelector);

                return isset($element) && $element->isVisible();
            });
        } catch (Exception $e) {
            throw new ElementNotVisible(sprintf('Element with selector: %s was not found', $cssSelector));
        }
    }
1210372
public function validateMatchesRegex(ElementInterface $element, array $params = null)
    {
        $value = $element->getFieldValue($this->handle);
        $match = preg_match($this->inputMask, $value);
        if ($match !== 1)
        {
            $element->addError($this->handle, Craft::t('site', $this->errorMessage));
        }
    }
1258927
public static void waitUntilElementIsPresent(final String elementLocator) {
        logger.entering(elementLocator);
        By by = HtmlElementUtils.resolveByType(elementLocator);
        ExpectedCondition<WebElement> condition = ExpectedConditions.presenceOfElementLocated(by);
        waitForCondition(condition);
        logger.exiting();
    }