[prev in list] [next in list] [prev in thread] [next in thread] 

List:       htmlunit-develop
Subject:    [HtmlUnit] SVN: [13284] branches/htmlunit3/htmlunit/src/main/java/com/gargoylesoftware
From:       asashour () users ! sourceforge ! net
Date:       2016-12-27 11:00:40
Message-ID: E1cLpUq-0006Wu-2L () sfs-ml-3 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 13284
          http://sourceforge.net/p/htmlunit/code/13284
Author:   asashour
Date:     2016-12-27 11:00:40 +0000 (Tue, 27 Dec 2016)
Log Message:
-----------
hu3: fix frameset event handlers

Modified Paths:
--------------
    branches/htmlunit3/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Element2.java


Modified: branches/htmlunit3/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Element2.java
 ===================================================================
--- branches/htmlunit3/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Element2.java	2016-12-27 \
                09:06:52 UTC (rev 13283)
+++ branches/htmlunit3/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Element2.java	2016-12-27 \
11:00:40 UTC (rev 13284) @@ -36,9 +36,9 @@
 import com.gargoylesoftware.htmlunit.javascript.host.dom.Attr2;
 import com.gargoylesoftware.htmlunit.javascript.host.dom.EventNode2;
 import com.gargoylesoftware.htmlunit.javascript.host.dom.Node2;
-import com.gargoylesoftware.htmlunit.javascript.host.event.Event2;
 import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLBodyElement2;
 import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLCollection;
+import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLFrameSetElement2;
 import com.gargoylesoftware.js.nashorn.ScriptUtils;
 import com.gargoylesoftware.js.nashorn.SimpleObjectConstructor;
 import com.gargoylesoftware.js.nashorn.SimplePrototypeObject;
@@ -120,10 +120,10 @@
 
         ScriptObject thisObject = this;
         final Global global = getWindow().getWebWindow().getGlobal();
-        if (thisObject instanceof HTMLBodyElement2) {
+        if (thisObject instanceof HTMLBodyElement2 || thisObject instanceof \
HTMLFrameSetElement2) {  thisObject = global;
         }
-        Context context = ((ScriptObject) global).getContext();
+        Context context = global.getContext();
         final Global oldGlobal = Context.getGlobal();
         final boolean globalChanged = oldGlobal != global;
         try {


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
HtmlUnit-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic