Executes a JavaScript action.

@param jsExpressionable $js

@return $this
9098
public function send($js)
    {
        $this->_output_bypass = true;
        $this->sse->send($js);
        $this->_output_bypass = false;

        return $this;
    }
1254905
public function _document_ready($js) {
		if (!is_array($js)) {
			$js=array (
					$js
			);
		}

		foreach ( $js as $script ) {
			$this->jquery_code_for_compile[]=$script;
		}
	}
268799
public function run(JsUtils $js){
		parent::run($js);
		if(isset($this->close)){
			$js->execOn("click", "#".$this->identifier." .close", "$(this).closest('.message').transition('fade')");
		}
	}
608439
public function compile(JsUtils $js=NULL, &$view=NULL) {
		if($this->autoActive){
			$this->setActive();
		}
		return parent::compile($js, $view);
	}
1038656
public static function js($js = null)
    {
        if (!is_null($js)) {
            self::$js = array_merge(self::$js, (array) $js);

            return;
        }

        $js = array_get(Form::collectFieldAssets(), 'js', []);

        static::$js = array_merge(static::$js, $js);

        return view('merchant::partials.js', ['js' => array_unique(static::$js)]);
    }
429301
public function compile(JsUtils $js=NULL, &$view=NULL) {
		if ($this->autoActive) {
			$this->setActive();
		}
		$count=$this->count();
		for($i=1; $i < $count; $i++) {
			$this->content[$i]->wrap($this->getContentDivider($i - 1));
		}
		return parent::compile($js, $view);
	}
1256960
public function run(JsUtils $js) {
		parent::run($js);
		if ($this->content instanceof HtmlDoubleElement) {
			$this->content->run($js);
		} else if (\is_array($this->content)) {
			foreach ( $this->content as $itemContent ) {
				if ($itemContent instanceof HtmlDoubleElement) {
					$itemContent->run($js);
				}
			}
		}
	}
998407
public function run(JsUtils $js){
		if(!isset($this->_bsComponent)){
			if(isset($this->close)){
				$js->execOn("click", "#".$this->identifier." .close", "$(this).closest('.message').transition({$this->_closeTransition})");
			}
			if(isset($this->_timeout)){
				$js->exec("setTimeout(function() { $('#{$this->identifier}').transition({$this->_closeTransition}); }, {$this->_timeout});",true);
			}
		}
		return parent::run($js);
	}
343262
public static function js($js = null)
    {
        if (!is_null($js)) {
            return self::$js = array_merge(self::$js, (array) $js);
        }

        if (!$js = static::getMinifiedJs()) {
            $js = array_merge(static::baseJs(), static::$js);
        }

        $js = array_filter(array_unique($js));

        return view('admin::partials.js', compact('js'));
    }
214927
public function bind($js)
    {
        foreach ($this->views as $view) {
            $this->event->listen("composing: {$view}", function () use ($js) {
                echo "<script>{$js}</script>";
            });
        }
    }
1374328
public function run(JsUtils $js){
		parent::run($js);
		return $js->semantic()->sticky("#".$this->identifier,$this->_params);
	}
349493
public function onShown($index, $jsCode) {
		$tab=$this->getTab($index);
		if (isset($tab))
			return $tab->onShown($jsCode);
	}
659425
protected function unlock($js)
	{
		if (empty($this->locks))
		{
			return $js;
		}

		foreach ($this->locks as $lock => $replacement)
		{
			$js = str_replace($lock, $replacement, $js);
		}

		return $js;
	}
513122
public static function js($scripts = array(), $attr = array(), $group = NULL, $raw = false)
	{
		return static::instance()->js($scripts, $attr, $group, $raw);
	}
1108641
public function exec($js, $immediatly=false) {
		$script=$js."\n";
		if ($immediatly)
			$this->jquery_code_for_compile[]=$script;
		return $script;
	}
1123720
public function registerJs($js, $pos = null)
    {
        $pos = $pos ? : ($this->controller ? : WebView::POS_END);
        $this->view->registerJs(static::parseBlockJs($js), $pos);
    }
647882
public function put()
    {
        $js = $this->constructJavaScript($this->normalizeInput(func_get_args()));

        $this->viewBinder->bind($js);

        return $js;
    }