向页面中插入script标签

@inner
@param {HTMLScriptElement} script script标签
421018
function appendScript( script ) {
        currentlyAddingScript = script;

        // If BASE tag is in play, using appendChild is a problem for IE6.
        // See: http://dev.jquery.com/ticket/2709
        baseElement
            ? headElement.insertBefore( script, baseElement )
            : headElement.appendChild( script );

        currentlyAddingScript = null;
    }
1340988
private void executeScript(String script) {
        try {
            final StatementSplitter statementSplitter =
                new StatementSplitterResolver(scriptConfigurationInstance.get()).resolve();
            final ScriptExecutor scriptExecutor =
                new ScriptExecutor(databaseConnection.get().getConnection(), scriptConfigurationInstance.get(),
                    statementSplitter);
            scriptExecutor.execute(script);
        } catch (SQLException e) {
            throw new DBUnitConnectionException("Unable to execute script.", e);
        }
    }
634650
function() {
    var i, jsDir, jsPath, scripts = _document.getElementsByTagName("script");
    for (i = scripts.length; i--; ) {
      if (!(jsPath = scripts[i].src)) {
        jsDir = null;
        break;
      }
      jsPath = _getDirPathOfUrl(jsPath);
      if (jsDir == null) {
        jsDir = jsPath;
      } else if (jsDir !== jsPath) {
        jsDir = null;
        break;
      }
    }
    return jsDir || undefined;
  }
138461
public Object executeScript(String script, JSONArray args) {

    try {
      JSONArray arguments = processScriptArguments(args);
      JSONObject response = getScriptResponse(script, arguments);
      Object o = cast(response);
      return o;
    } catch (JSONException e) {
      throw new WebDriverException(e);
    }

  }
1319998
function (src, success, error) {
		var s = document.createElement('script');
		s.src = src;
		s.async = true;
		s.onload = function() {
			document.body.removeChild(s);
			success && success();
		};
		s.onerror = function() {
			document.body.removeChild(s);
			error && error();
		};
		document.body.appendChild(s);
	}
207195
def execute_script(script, *args)
      args.map! do |e|
        e.is_a?(Element) ? e.wait_until(&:exists?).wd : e
      end
      returned = driver.execute_script(script, *args)

      browser.wrap_elements_in(self, returned)
    end
721535
protected void runScript(File script) {
        if (!script.exists()) {
            JOptionPane.showMessageDialog(cliGuiCtx.getMainPanel(), script.getAbsolutePath() + " does not exist.",
                                          "Unable to run script.", JOptionPane.ERROR_MESSAGE);
            return;
        }

        int choice = JOptionPane.showConfirmDialog(cliGuiCtx.getMainPanel(), "Run CLI script " + script.getName() + "?",
                                                   "Confirm run script", JOptionPane.YES_NO_OPTION);
        if (choice != JOptionPane.YES_OPTION) return;

        menu.addScript(script);

        cliGuiCtx.getTabs().setSelectedIndex(1); // set to Output tab to view the output
        output.post("\n");

        SwingWorker scriptRunner = new ScriptRunner(script);
        scriptRunner.execute();
    }
346010
public void setPreInstallScript( final String script) {
        setPreInstallProgram(readProgram(script));
        if ( script != null) format.getHeader().createEntry( PREINSCRIPT, script);
	}
620189
function getScript(url) {
		
		var script = scripts[url.name || url];
		if (script) { return script; }
		
		if (typeof url == 'object') {
			for (var key in url) {
				if (url[key]) {
					script = { name: key, url: url[key] };
				}
			}
		} else {


			var els = url.split("/"),
				 name = els[els.length -1],
				 i = name.indexOf("?");
				 
			script = {
				name: i != -1 ? name.substring(0, i) : name, 
				url: url 
			}; 
		}
		
		scripts[script.name] = script;
		return script;
	}
856460
function _buildScriptContainer(){
        let parent = document.getElementById('ac__script');
        if (parent == null){
            parent = document.createElement('div');
            parent.id = 'ac__script';
            parent.appendChild(document.createElement('script'));
            document.body.appendChild(parent);
        }
    }
364662
function insertScript (url) {
  const script = document.createElement('script')

  script.async = true
  script.src = url

  document.head.appendChild(script)

  return script
}
553072
public function script($script) {
        $md5 = md5($script);
        if (in_array($md5, self::$cssScriptHistory))
            return '';
        self::$cssScriptHistory[] = $md5;
        return "<script type=\"text/javascript\">\n/*<![CDATA[*/\n{$script}\n/*]]>*/\n</script>";
    }
858952
public JavaScriptActionBuilder javascript(String script) {
        JavaScriptAction action = new JavaScriptAction();
        action.setScript(script);
        action(action);
        return new JavaScriptActionBuilder(action);
    }
447586
private void processScript() {

        ScriptReaderBase scr = null;

        try {
            if (database.isFilesInJar()
                    || fa.isStreamElement(scriptFileName)) {
                scr = ScriptReaderBase.newScriptReader(database,
                                                       scriptFileName,
                                                       scriptFormat);

                Session session =
                    database.sessionManager.getSysSessionForScript(database);

                scr.readAll(session);
                scr.close();
            }
        } catch (Throwable e) {
            if (scr != null) {
                scr.close();

                if (cache != null) {
                    cache.close(false);
                }

                closeAllTextCaches(false);
            }

            database.logger.appLog.logContext(e, null);

            if (e instanceof HsqlException) {
                throw (HsqlException) e;
            } else if (e instanceof IOException) {
                throw Error.error(ErrorCode.FILE_IO_ERROR, e.toString());
            } else if (e instanceof OutOfMemoryError) {
                throw Error.error(ErrorCode.OUT_OF_MEMORY);
            } else {
                throw Error.error(ErrorCode.GENERAL_ERROR, e.toString());
            }
        }
    }
534670
private String getScriptAddress(@Nullable Script script) {
        String address = "";
        try {
            if (script != null) {
                address = script.getToAddress(params, true).toString();
            }
        } catch (Exception e) {
        }
        return address;
    }
589211
function inject_script_shim () {
      if (options.include_js) {
        var script_tag = '<script type="text/javascript" src="' + options.include_js + '"></script>';
        if (options.js_insert_marker && html.indexOf(options.js_insert_marker) !== -1) {
          html = html.replace(options.js_insert_marker, script_tag);
        }
        else {
          var shims = ["</body>", "</html>", "</head>"];
          inject(script_tag, shims);
        }
      }
    }
1019272
function resolveScripts(file, pathes) {
    var filePath = file.path,
        scriptsStr = '';

    for(var i = 0, len = pathes.length; i < len; i ++) {
        scriptsStr += '<script defer src="' + path.relative(path.dirname(filePath), pathes[i]) + '"></script>\r\n';
    }

    return scriptsStr;
}