public function js($aliasOrUrl)
    {
        $url = $this->getJsUrl($aliasOrUrl);
        if (!$this->included->isIncluded($url)) {
            $this->included->markAsIncluded($url);
            $type = 'text/javascript';
            return new Tag('script', ['src' => $url, 'type' => $type]);
        } else {
            return new DataView();
        }
    }
public function js($aliasOrUrl)
    {
        $url = $this->getJsUrl($aliasOrUrl);
        if (!$this->included->isIncluded($url)) {
            $this->included->markAsIncluded($url);
            $type = 'text/javascript';
            return new Tag('script', ['src' => $url, 'type' => $type]);
        } else {
            return new DataView();
        }
    }
public function js ( $ aliasOrUrl ) { $ url = $ this -> getJsUrl ( $ aliasOrUrl ) ; if ( ! $ this -> included -> isIncluded ( $ url ) ) { $ this -> included -> markAsIncluded ( $ url ) ; $ type = 'text/javascript' ; return new Tag ( 'script' , [ 'src' => $ url , 'type' => $ type ] ) ; } else { return new DataView ( ) ; } }
Returns component that renders html script tag for including specified javascript resource
or component that renders empty string if resource was already included.

@param string $aliasOrUrl script URL or alias
@return Tag|DataView
Returns component that renders html script tag for including specified javascript resource or component that renders empty string if resource was already included .