MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / fire

Method fire

src/main/java/org/htmlunit/javascript/host/WebSocket.java:517–529  ·  view source on GitHub ↗
(final Event evt)

Source from the content-addressed store, hash-verified

515 }
516
517 void fire(final Event evt) {
518 evt.setTarget(this);
519 evt.setParentScope(getParentScope());
520 evt.setPrototype(getPrototype(evt.getClass()));
521
522 final AbstractJavaScriptEngine<?> engine = containingPage_.getWebClient().getJavaScriptEngine();
523 if (engine != null) {
524 engine.getContextFactory().call(cx -> {
525 executeEventLocally(evt);
526 return null;
527 });
528 }
529 }
530
531 void callFunction(final Function function, final Object[] args) {
532 if (function == null) {

Callers 15

onWebSocketOpenMethod · 0.95
onWebSocketCloseMethod · 0.95
onWebSocketTextMethod · 0.95
onWebSocketBinaryMethod · 0.95
onWebSocketErrorMethod · 0.95
callbacks.jsFile · 0.80
defaultPrefilterFunction · 0.80
queue.jsFile · 0.80
handleQueueMarkDeferFunction · 0.80
jquery-1.8.1.jsFile · 0.80
defaultPrefilterFunction · 0.80
handleQueueMarkDeferFunction · 0.80

Calls 11

getParentScopeMethod · 0.80
setPrototypeMethod · 0.80
getJavaScriptEngineMethod · 0.80
getWebClientMethod · 0.65
getContextFactoryMethod · 0.65
setTargetMethod · 0.45
setParentScopeMethod · 0.45
getPrototypeMethod · 0.45
getClassMethod · 0.45
callMethod · 0.45
executeEventLocallyMethod · 0.45

Tested by

no test coverage detected