[HtmlUnit] SVN: [14444] 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: [14444] trunk/htmlunit/src

asashour-2
Revision: 14444
          http://sourceforge.net/p/htmlunit/code/14444
Author:   asashour
Date:     2017-05-13 14:41:28 +0000 (Sat, 13 May 2017)
Log Message:
-----------
frameset handlers

Modified Paths:
--------------
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFrameSetElement.java
    trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/ElementPropertiesTest.java

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFrameSetElement.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFrameSetElement.java 2017-05-13 14:22:31 UTC (rev 14443)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLFrameSetElement.java 2017-05-13 14:41:28 UTC (rev 14444)
@@ -26,6 +26,7 @@
 import com.gargoylesoftware.htmlunit.javascript.configuration.JsxSetter;
 
 import net.sourceforge.htmlunit.corejs.javascript.Context;
+import net.sourceforge.htmlunit.corejs.javascript.Function;
 
 /**
  * The JavaScript object {@code HTMLFrameSetElement}.
@@ -129,4 +130,293 @@
     public void setOuterHTML(final Object value) {
         throw Context.reportRuntimeError("outerHTML is read-only for tag 'frameset'");
     }
+
+    /**
+     * Returns the {@code onbeforeunload} event handler.
+     * @return the {@code onbeforeunload} event handler
+     */
+    @JsxGetter
+    public Function getOnbeforeunload() {
+        return getEventHandler("beforeunload");
+    }
+
+    /**
+     * Sets the {@code onbeforeunload} event handler.
+     * @param beforeunload the {@code onbeforeunload} event handler
+     */
+    @JsxSetter
+    public void setOnbeforeunload(final Object beforeunload) {
+        setEventHandler("beforeunload", beforeunload);
+    }
+
+    /**
+     * Returns the {@code onhashchange} event handler.
+     * @return the {@code onhashchange} event handler
+     */
+    @JsxGetter
+    public Function getOnhashchange() {
+        return getEventHandler("hashchange");
+    }
+
+    /**
+     * Sets the {@code onhashchange} event handler.
+     * @param hashchange the {@code onhashchange} event handler
+     */
+    @JsxSetter
+    public void setOnhashchange(final Object hashchange) {
+        setEventHandler("hashchange", hashchange);
+    }
+
+    /**
+     * Returns the {@code onlanguagechange} event handler.
+     * @return the {@code onlanguagechange} event handler
+     */
+    @JsxGetter({CHROME, FF})
+    public Function getOnlanguagechange() {
+        return getEventHandler("languagechange");
+    }
+
+    /**
+     * Sets the {@code onlanguagechange} event handler.
+     * @param languagechange the {@code onlanguagechange} event handler
+     */
+    @JsxSetter({CHROME, FF})
+    public void setOnlanguagechange(final Object languagechange) {
+        setEventHandler("languagechange", languagechange);
+    }
+
+    /**
+     * Returns the {@code onmessage} event handler.
+     * @return the {@code onmessage} event handler
+     */
+    @JsxGetter
+    public Function getOnmessage() {
+        return getEventHandler("message");
+    }
+
+    /**
+     * Sets the {@code onmessage} event handler.
+     * @param message the {@code onmessage} event handler
+     */
+    @JsxSetter
+    public void setOnmessage(final Object message) {
+        setEventHandler("message", message);
+    }
+
+    /**
+     * Returns the {@code onoffline} event handler.
+     * @return the {@code onoffline} event handler
+     */
+    @JsxGetter
+    public Function getOnoffline() {
+        return getEventHandler("offline");
+    }
+
+    /**
+     * Sets the {@code onoffline} event handler.
+     * @param offline the {@code onoffline} event handler
+     */
+    @JsxSetter
+    public void setOnoffline(final Object offline) {
+        setEventHandler("offline", offline);
+    }
+
+    /**
+     * Returns the {@code ononline} event handler.
+     * @return the {@code ononline} event handler
+     */
+    @JsxGetter
+    public Function getOnonline() {
+        return getEventHandler("online");
+    }
+
+    /**
+     * Sets the {@code ononline} event handler.
+     * @param online the {@code ononline} event handler
+     */
+    @JsxSetter
+    public void setOnonline(final Object online) {
+        setEventHandler("online", online);
+    }
+
+    /**
+     * Returns the {@code onpagehide} event handler.
+     * @return the {@code onpagehide} event handler
+     */
+    @JsxGetter
+    public Function getOnpagehide() {
+        return getEventHandler("pagehide");
+    }
+
+    /**
+     * Sets the {@code onpagehide} event handler.
+     * @param pagehide the {@code onpagehide} event handler
+     */
+    @JsxSetter
+    public void setOnpagehide(final Object pagehide) {
+        setEventHandler("pagehide", pagehide);
+    }
+
+    /**
+     * Returns the {@code onpageshow} event handler.
+     * @return the {@code onpageshow} event handler
+     */
+    @JsxGetter
+    public Function getOnpageshow() {
+        return getEventHandler("pageshow");
+    }
+
+    /**
+     * Sets the {@code onpageshow} event handler.
+     * @param pageshow the {@code onpageshow} event handler
+     */
+    @JsxSetter
+    public void setOnpageshow(final Object pageshow) {
+        setEventHandler("pageshow", pageshow);
+    }
+
+    /**
+     * Returns the {@code onpopstate} event handler.
+     * @return the {@code onpopstate} event handler
+     */
+    @JsxGetter({CHROME, FF})
+    public Function getOnpopstate() {
+        return getEventHandler("popstate");
+    }
+
+    /**
+     * Sets the {@code onpopstate} event handler.
+     * @param popstate the {@code onpopstate} event handler
+     */
+    @JsxSetter({CHROME, FF})
+    public void setOnpopstate(final Object popstate) {
+        setEventHandler("popstate", popstate);
+    }
+
+    /**
+     * Returns the {@code onrejectionhandled} event handler.
+     * @return the {@code onrejectionhandled} event handler
+     */
+    @JsxGetter(CHROME)
+    public Function getOnrejectionhandled() {
+        return getEventHandler("rejectionhandled");
+    }
+
+    /**
+     * Sets the {@code onrejectionhandled} event handler.
+     * @param rejectionhandled the {@code onrejectionhandled} event handler
+     */
+    @JsxSetter(CHROME)
+    public void setOnrejectionhandled(final Object rejectionhandled) {
+        setEventHandler("rejectionhandled", rejectionhandled);
+    }
+
+    /**
+     * Returns the {@code onstorage} event handler.
+     * @return the {@code onstorage} event handler
+     */
+    @JsxGetter
+    public Function getOnstorage() {
+        return getEventHandler("storage");
+    }
+
+    /**
+     * Sets the {@code onstorage} event handler.
+     * @param storage the {@code onstorage} event handler
+     */
+    @JsxSetter
+    public void setOnstorage(final Object storage) {
+        setEventHandler("storage", storage);
+    }
+
+    /**
+     * Returns the {@code onunhandledrejection} event handler.
+     * @return the {@code onunhandledrejection} event handler
+     */
+    @JsxGetter(CHROME)
+    public Function getOnunhandledrejection() {
+        return getEventHandler("unhandledrejection");
+    }
+
+    /**
+     * Sets the {@code onunhandledrejection} event handler.
+     * @param unhandledrejection the {@code onunhandledrejection} event handler
+     */
+    @JsxSetter(CHROME)
+    public void setOnunhandledrejection(final Object unhandledrejection) {
+        setEventHandler("unhandledrejection", unhandledrejection);
+    }
+
+    /**
+     * Returns the {@code onunload} event handler.
+     * @return the {@code onunload} event handler
+     */
+    @JsxGetter
+    public Function getOnunload() {
+        return getEventHandler("unload");
+    }
+
+    /**
+     * Sets the {@code onunload} event handler.
+     * @param unload the {@code onunload} event handler
+     */
+    @JsxSetter
+    public void setOnunload(final Object unload) {
+        setEventHandler("unload", unload);
+    }
+
+    /**
+     * Returns the {@code onafterprint} event handler.
+     * @return the {@code onafterprint} event handler
+     */
+    @JsxGetter({FF, IE})
+    public Function getOnafterprint() {
+        return getEventHandler("afterprint");
+    }
+
+    /**
+     * Sets the {@code onafterprint} event handler.
+     * @param afterprint the {@code onafterprint} event handler
+     */
+    @JsxSetter({FF, IE})
+    public void setOnafterprint(final Object afterprint) {
+        setEventHandler("afterprint", afterprint);
+    }
+
+    /**
+     * Returns the {@code onbeforeprint} event handler.
+     * @return the {@code onbeforeprint} event handler
+     */
+    @JsxGetter({FF, IE})
+    public Function getOnbeforeprint() {
+        return getEventHandler("beforeprint");
+    }
+
+    /**
+     * Sets the {@code onbeforeprint} event handler.
+     * @param beforeprint the {@code onbeforeprint} event handler
+     */
+    @JsxSetter({FF, IE})
+    public void setOnbeforeprint(final Object beforeprint) {
+        setEventHandler("beforeprint", beforeprint);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @JsxGetter(IE)
+    public Function getOnresize() {
+        return super.getOnresize();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    @JsxSetter(IE)
+    public void setOnresize(final Object resize) {
+        super.setOnresize(resize);
+    }
+
 }

Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/ElementPropertiesTest.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/ElementPropertiesTest.java 2017-05-13 14:22:31 UTC (rev 14443)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/ElementPropertiesTest.java 2017-05-13 14:41:28 UTC (rev 14444)
@@ -1456,7 +1456,7 @@
             EDGE = "border,borderColor,cols,frameBorder,frameSpacing,name,onafterprint,onbeforeprint,onbeforeunload,"
                 + "onhashchange,onmessage,onoffline,ononline,onpagehide,onpageshow,onresize,onstorage,onunload,"
                 + "rows")
-    @NotYetImplemented
+    @NotYetImplemented(IE)
     public void frameset() throws Exception {
         test("frameset");
     }


------------------------------------------------------------------------------
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