Package com.gargoylesoftware.htmlunit.javascript.host

Examples of com.gargoylesoftware.htmlunit.javascript.host.Node


                ok = false;
            }
            // If the download was a success, trigger the onload handler.
            if (ok) {
                final Event event = new Event(this, Event.TYPE_LOAD);
                final Node scriptObject = (Node) getScriptObject();
                final PostponedAction action = new PostponedAction(getPage()) {
                    @Override
                    public void execute() throws Exception {
                        scriptObject.executeEvent(event);
                    }
                };
                final String readyState = htmlPage.getReadyState();
                if (READY_STATE_LOADING.equals(readyState)) {
                    htmlPage.addAfterLoadAction(action);
View Full Code Here


            parent.jsxFunction_removeChild(this);
            if (!removeChildren) {
                final HTMLCollection collection = jsxGet_childNodes();
                final int length = collection.jsxGet_length();
                for (int i = 0; i < length; i++) {
                    final Node object = (Node) collection.jsxFunction_item(0);
                    parent.jsxFunction_appendChild(object);
                }
            }
        }
        return this;
View Full Code Here

     * Gets the JavaScript property "parentElement".
     * @return the parent element
     * @see #jsxGet_parentNode()
     */
    public HTMLElement jsxGet_parentElement() {
        final Node parent = jsxGet_parentNode();
        if (!(parent instanceof HTMLElement)) {
            return null;
        }
        return (HTMLElement) parent;
    }
View Full Code Here

     * to {@link #jsxGet_parentNode()} except that it skips XML nodes.
     * @return the parent HTML element
     * @see #jsxGet_parentNode()
     */
    public HTMLElement getParentHTMLElement() {
        Node parent = jsxGet_parentNode();
        while (parent != null && !(parent instanceof HTMLElement)) {
            parent = parent.jsxGet_parentNode();
        }
        return (HTMLElement) parent;
    }
View Full Code Here

TOP

Related Classes of com.gargoylesoftware.htmlunit.javascript.host.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.