Add JS file to load at this document's header.
349285
def add_jsfile_head(self, src: str) -> None:
        """"""
        self.head.appendChild(Script(src=src))
523044
protected function addResourcesToHead()
    {
        parent::addResourcesToHead();

        // Add pz2-neuerwerbungen.css to <head>.
        $cssTag = new TagBuilder('link');
        $cssTag->addAttribute('rel', 'stylesheet');
        $cssTag->addAttribute('type', 'text/css');
        $cssTag->addAttribute('href', $this->conf['pz2-neuerwerbungenCSSPath']);
        $cssTag->addAttribute('media', 'all');
        $this->response->addAdditionalHeaderData($cssTag->render());

        // Add pz2-neuerwerbungen.js to <head>.
        $scriptTag = new TagBuilder('script');
        $scriptTag->addAttribute('type', 'text/javascript');
        $scriptTag->addAttribute('src', $this->conf['pz2-neuerwerbungenJSPath']);
        $scriptTag->forceClosingTag(true);
        $this->response->addAdditionalHeaderData($scriptTag->render());

        // Make jQuery initialise pazpar2neuerwerbungen when the DOM is ready.
        $jsCommand = 'jQuery(document).ready(pz2neuerwerbungenDOMReady);';
        $scriptTag = new TagBuilder('script');
        $scriptTag->addAttribute('type', 'text/javascript');
        $scriptTag->setContent($jsCommand);
        $this->response->addAdditionalHeaderData($scriptTag->render());
    }
1104512
function loadJS(src, callback, attrs, timeout, fail, complete) {
    if ($.isObject(src)) {
        callback = src.callback;
        attrs = src.attrs;
        timeout = src.timeout;
        fail = src.fail;
        complete = src.complete;
        src = src.src;
        return loadJS(src, callback, attrs, timeout, fail, complete);
    }
    var script = document.createElement('script');
    var done = false;
    if ($.isObject(attrs)) {
        for (var i in attrs) {
            script.setAttribute(i, attrs[i]);
        }
    }
    var urls = getPath(src);
    src = script.src = urls[0];
    script.async = true;
    script.type = 'text/javascript';
    script.charset = defaultConfig.charset;
    complete = $.isFunction(complete) ? complete : emptyFn;
    script.onload = script.onreadystatechange = function(e) {
        e = e || cleanObj
        if (!done && (e.type === 'load' || /loaded|complete|undefined/.test(script.readyState))) {
            done = true;
            removeNode(script);
            mapLoaded[src] = 'loaded';
            $.isFunction(callback) && callback();
            complete('load');
        }
    };
    script.onerror = function() {
        done = true;
        mapLoaded[src] = 'error';
        $.isFunction(fail) && fail();
        complete('error');
    };
    timeout = $.isNumber(timeout) ? timeout : defaultConfig.timeout;
    if (timeout) {
        setTimeout(function() {
            if (!done) {
                done = true;
                mapLoaded[src] = 'timeout';
                complete('timeout');
            }
        }, timeout);
    }
    mapLoaded[src] = 'pending';
    head.insertBefore(script, base);
    return _;
}
897047
public function addJs($name, $jsFile, $order = 10, $active = 1)
    {
        $this->_data['js'][$name] = array(
            'file' => $jsFile,
            'order' => $order,
            'active' => $active
            );
    }
502019
function ()
    {
      // Add key events
      jQuery(document).on('keyup.jBox-Image-' + this.id, function (ev) {
        (ev.keyCode == 37) && this.showImage('prev');
        (ev.keyCode == 39) && this.showImage('next');
      }.bind(this));

      // Load the image from the attached element
      this.showImage('open');
    }
881041
public static void addToHeader(final String scriptname) {
    if (!CssResources.isInHeader(scriptname)) {
      final LinkElement styleLinkElement = Browser.getDocument().createLinkElement();
      styleLinkElement.setRel(CssResources.REL_TYPE);
      styleLinkElement.setType(CssResources.SCRIPT_TYPE);
      styleLinkElement.setHref(scriptname);
      Browser.getDocument().getHead().appendChild(styleLinkElement);
    }
  }
926147
def AddHeader(self, header, value):
        '''
        '''
        self.user_headers.append((header, value))
        return self
195078
public function addOnReady($js)
    {
        if (is_object($js)) {
            $js = $js->getString();
        }
        $this->app->template->appendHTML('document_ready', $js.";\n");

        return $this;
    }
220367
def add(self, header, data) :
		""""""
		if header[0] != '>' :
			self.data.append(('>'+header, data))
		else :
			self.data.append((header, data))
1146744
public function Initialize() {
      $this->Head = new HeadModule($this);
      $this->AddJsFile('jquery.js');
      $this->AddJsFile('jquery.livequery.js');
      $this->AddJsFile('jquery.form.js');
      $this->AddJsFile('jquery.popup.js');
      $this->AddJsFile('jquery.gardenhandleajaxform.js');
      $this->AddJsFile('global.js');
      $this->AddCssFile('style.css');
      $this->AddModule('GuestModule');
      parent::Initialize();
   }
540673
function loadBeautify() {
    if (!self.beautify) {
      self.beautify = require('js-beautify').html;
      var rc = path.join(process.cwd(), '.jsbeautifyrc');
      if (fs.existsSync(rc)) {
        self.beautifyrc = JSON.parse(fs.readFileSync(rc, 'utf8'));
      }
    }
  }
1009750
function loadJSConfigFile(filePath) {
    debug(`Loading JS config file: ${filePath}`);
    try {
        return importFresh(filePath);
    } catch (e) {
        debug(`Error reading JavaScript file: ${filePath}`);
        e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
        throw e;
    }
}
636958
public static function addJavaScript($js, $docready = false)
    {
        return self::$app->getResponse()->addJavaScript($js,$docready);
    }
181448
public function Initialize() {
      $this->Head = new HeadModule($this);
      $this->Head->AddTag('meta', array('name' => 'robots', 'content' => 'noindex'));
      
      $this->AddJsFile('jquery.js');
      $this->AddJsFile('jquery.livequery.js');
      $this->AddJsFile('jquery.form.js');
      $this->AddJsFile('jquery.popup.js');
      $this->AddJsFile('jquery.gardenhandleajaxform.js');
      $this->AddJsFile('global.js');
      
      $this->AddCssFile('style.css');
      parent::Initialize();
      Gdn_Theme::Section('Entry');
   }
80069
def load(self, filething, **kwargs):
        """"""

        fileobj = filething.fileobj

        try:
            self.tags = _IFFID3(fileobj, **kwargs)
        except ID3NoHeaderError:
            self.tags = None
        except ID3Error as e:
            raise error(e)
        else:
            self.tags.filename = self.filename

        fileobj.seek(0, 0)
        self.info = AIFFInfo(fileobj)
1265370
function AddDocuments () {
		// Create Helpdoc Route
		HLP .all("/", ReqHandle.Valid(true), GetHelp);
		API .use('/docs', HLP);
	}
902685
function () {
            if ( this._isComplete ) return;
            $B( this.img ).addEvent( 'load', this._handler );
            $B( this.img ).addEvent( 'error', this._handler );
            this.img.src = this._path;
            return this;
        }