Ensure respond js script element.
14428
private void ensureRespondJsScriptElement() {
		if (this.respondJsScript == null) {
			this.respondJsScript = Document.get().createScriptElement();
			this.respondJsScript.setSrc(GWT.getModuleBaseForStaticFiles() + DefaultIE8ThemeController.RESPOND_JS_LOCATION);
			this.respondJsScript.setType("text/javascript");
		}
	}
555204
def _script_reload(script, input, output):
    """"""
    input = [Path(entry).expand().abspath() for entry in input]
    output = Path(output).expand().abspath()
    cmd = 'python3 {0} {1} {2}'.format(script, ' '.join(input), output)
    event_handler = RunScriptChangeHandler(cmd)
    event_handler.run()  # run always once
    observer = Observer()
    path = script.dirname().expand().abspath()
    click.secho('watch: {0}'.format(path), fg='blue')
    observer.schedule(event_handler, path, recursive=True)
    for entry in input:
        entry = entry.dirname().expand().abspath()
        click.secho('watch: {0}'.format(entry), fg='blue')
        observer.schedule(event_handler, entry, recursive=True)
    path = Path(__file__).parent / 'qface'
    click.secho('watch: {0}'.format(path), fg='blue')
    observer.schedule(event_handler, path, recursive=True)
    observer.start()

    try:
        while True:
            time.sleep(1)
    except KeyboardInterrupt:
        observer.stop()
    observer.join()
1194295
function ensure(parent, ids, fn) {
		ids = [].concat(ids);
		var visited = {}, wait = 0;

		function done() {
			if (fn) { fn.apply(global, map(ids, function(id) { return require(parent, id); })); }
			fn = undefined;
		}
		function visit(module) {
			if (module.id in visited) { return; }
			if ((visited[module.id] = module.loaded)) { return map(module.children, visit); }

			++wait;
			waits[module.id].push(function() {
				map(module.children, visit);
				if (--wait <= 0) { setTimeout(done, 0); }
			});

			var script;
			map(doc.querySelectorAll('script'), function(node) {
				if (canonicalize(node.src) === module.uri) { script = node; }
			});

			if (!script) {
				script = doc.createElement('script');
				script.onload = script.onerror = script.onreadystatechange = function() {
					if ('loading' === script.readyState) { return; }
					script.onload = script.onerror = script.onreadystatechange = null;
					fireWaits(module);
				};
				script.defer = true;
				script.src = module.uri;
				doc.querySelector('head').appendChild(script);
			}
		}

		map(ids, function(id) { visit(getModule(parent, id)); });
		if (wait <= 0) { setTimeout(done, 0); } // always async
	}
845886
def submit(self):
        
        def submit_element():
            """
            Wrapper to submit element
            """
            return self.element.submit()
        self.execute_and_handle_webelement_exceptions(submit_element, 'send keys')
        return self
1137744
def response_handler(msg: Dict[str, str]) -> None:
    """"""
    from wdom.document import getElementByWdomId
    id = msg['id']
    elm = getElementByWdomId(id)
    if elm:
        elm.on_response(msg)
    else:
        logger.warning('No such element: wdom_id={}'.format(id))
432985
def eval_js(self, expr):
        """"""
        if not self.is_built():
            self._pending_js_eval.append(expr)
            return
        logger.log(5, "Evaluate Javascript: `%s`.", expr)
        out = self.page().mainFrame().evaluateJavaScript(expr)
        return _to_py(out)
475382
function onReadyStateChange(req, scriptTag) {
		if (scriptTag && scriptTag.readyState != 'loaded') { return; }
		scriptTag.onreadystatechange = function() {};
		checkForError.call(this, req);
	}
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());
            }
        }
    }
578497
async def handler(event):
    """"""
    await asyncio.wait([
        event.delete(),
        event.respond(
            LEARN_PYTHON, reply_to=event.reply_to_msg_id, link_preview=False)
    ])
668507
private function validateScriptParams()
    {
        $this->script_params = array_intersect_key(
            $this->script_params,
            array_fill_keys(self::$valid_script_params, null)
        );
    }
474033
function(url) {
  var done = _onImportScript(url)
  loadScript(
    url,
    function runScript(err, code) {
      if (err) return done(err)
      executeJailed(code, url, done)
    }
  )
}
29187
def set_input_value(self, selector, value):
        """"""
        script = 'document.querySelector("%s").setAttribute("value", "%s")'
        script = script % (selector, value)
        self.evaluate(script)
934523
async def handler(event):
    """"""
    q1 = event.pattern_match.group(1)
    q2 = urllib.parse.quote(q1)
    await asyncio.wait([
        event.delete(),
        event.respond(DOCS.format(q1, q2), reply_to=event.reply_to_msg_id)
    ])
624953
function getScriptElementContents(el) {
  if (!isElement(el)) {
    throw new TypeError('Expected a DOM Node, got ' + common.unexpectedObjToString(el));
  }
  if (el.type !== 'text/ohm-js') {
    throw new Error('Expected a script tag with type="text/ohm-js", got ' + el);
  }
  return el.getAttribute('src') ? load(el.getAttribute('src')) : el.innerHTML;
}
1025503
def append_js!(html, after_script_name, script_name)
      html.sub!(script_matcher(after_script_name)) do
        "#{$~}\n" + helper.javascript_include_tag(script_name)
      end
    end
278403
function validateElement(item) {
      if (!item) return
      if (!__passed) {
        __errors.push({
          element: item.element,
          type: item.type
        })
        if (item.callback) item.callback()
      } else {
        convertToObject($(item.element).array[0].getAttribute('name'), $(item.element).array[0].value)
      }
    }
168386
public void doScript(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
        _doScript(req, rsp, "_script.jelly");
    }