Skip to content

Commit 6ca1db9

Browse files
committed
revert, have to think about this
1 parent 92e0a21 commit 6ca1db9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/org/htmlunit/javascript/host/event/EventHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ public Object call(final Context cx, final Scriptable scope,
6464
if (realFunction_ == null) {
6565
final String js = "function on" + eventName_ + "(event) { " + jsSnippet_ + " \n}";
6666
// HtmlUnitScriptable scope = scope.getTopLevelScope(scope);
67-
realFunction_ = cx.compileFunction(scope, js, eventName_ + " event for " + node_
67+
realFunction_ = cx.compileFunction(thisObj, js, eventName_ + " event for " + node_
6868
+ " in " + node_.getPage().getUrl(), 0, null);
69-
realFunction_.setParentScope(scope);
69+
realFunction_.setParentScope(thisObj);
7070
}
7171

7272
return realFunction_.call(cx, scope, thisObj, args);

0 commit comments

Comments
 (0)