[HtmlUnit] SVN: [14347] trunk/htmlunit/src

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] SVN: [14347] trunk/htmlunit/src

asashour-2
Revision: 14347
          http://sourceforge.net/p/htmlunit/code/14347
Author:   asashour
Date:     2017-05-04 09:13:01 +0000 (Thu, 04 May 2017)
Log Message:
-----------
Remove Node.detachEvent

Modified Paths:
--------------
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Node.java
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement.java
    trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/Window3Test.java

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Node.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Node.java 2017-05-04 08:55:29 UTC (rev 14346)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Node.java 2017-05-04 09:13:01 UTC (rev 14347)
@@ -26,8 +26,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.lang3.StringUtils;
-
 import com.gargoylesoftware.htmlunit.SgmlPage;
 import com.gargoylesoftware.htmlunit.html.DomDocumentFragment;
 import com.gargoylesoftware.htmlunit.html.DomElement;
@@ -586,17 +584,6 @@
     }
 
     /**
-     * Allows the removal of event listeners on the event target.
-     * @param type the event type to listen for (like "onclick")
-     * @param listener the event listener
-     * @see <a href="http://msdn.microsoft.com/en-us/library/ms536411.aspx">MSDN documentation</a>
-     */
-    @JsxFunction(IE)
-    public void detachEvent(final String type, final Function listener) {
-        removeEventListener(StringUtils.substring(type, 2), listener, false);
-    }
-
-    /**
      * Returns the owner document.
      * @return the document
      */
@@ -707,7 +694,7 @@
      * @param element element object that specifies the element to check
      * @return true if the element is contained within this object
      */
-    @JsxFunction
+    @JsxFunction({CHROME, FF})
     public boolean contains(final Object element) {
         if (!(element instanceof Node)) {
             if (getBrowserVersion().hasFeature(JS_NODE_CONTAINS_RETURNS_FALSE_FOR_INVALID_ARG)) {

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement.java 2017-05-04 08:55:29 UTC (rev 14346)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement.java 2017-05-04 09:13:01 UTC (rev 14347)
@@ -2509,4 +2509,12 @@
         setEventHandler("oninput", onchange);
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @JsxFunction(IE)
+    public boolean contains(final Object element) {
+        return super.contains(element);
+    }
 }

Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/Window3Test.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/Window3Test.java 2017-05-04 08:55:29 UTC (rev 14346)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/Window3Test.java 2017-05-04 09:13:01 UTC (rev 14347)
@@ -1019,7 +1019,6 @@
     }
 
     /**
-     * Regression test for bug 1596926.
      * @throws Exception if the test fails
      */
     @Test


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop