/** * Gets the currently wrapped window JavaScript object. * @return the current window object */ @Override public SimpleScriptable getWrappedScriptable() { return (Window) webWindow_.getScriptObject(); } }
/** * Gets the currently wrapped window JavaScript object. * @return the current window object */ @Override public SimpleScriptable getWrappedScriptable() { return (Window) webWindow_.getScriptObject(); } }
/** * Returns the value of the top property. * @return the value of "top" */ public SimpleScriptable jsxGet_top() { final WebWindow topWebWindow = webWindow_.getTopWindow(); return (SimpleScriptable) topWebWindow.getScriptObject(); }
/** {@inheritDoc} */ public void webWindowContentChanged(final WebWindowEvent event) { WebWindow webWindow = event.getWebWindow(); if (!windows.contains(webWindow) && webWindow.getScriptObject() != null) { windows.add(webWindow); } }
/** Adds registered event listeners to the window. * {@inheritDoc} */ @Override public void webWindowContentChanged(final WebWindowEvent event) { com.gargoylesoftware.htmlunit.javascript.host.Window window; window = (com.gargoylesoftware.htmlunit.javascript.host.Window) event .getWebWindow().getScriptObject(); registerEventListeners(window); publishConfiguration(window); }
/** * Returns the value of the parent property. * @return the value of window.parent */ public SimpleScriptable jsxGet_parent() { final WebWindow parentWebWindow = webWindow_.getParentWindow(); return (SimpleScriptable) parentWebWindow.getScriptObject(); }
/** * Returns the value of the top property. * @return the value of "top" */ public SimpleScriptable jsxGet_top() { final WebWindow topWebWindow = webWindow_.getTopWindow(); return (SimpleScriptable) topWebWindow.getScriptObject(); }
/** * Returns the value of the parent property. * @return the value of window.parent */ public SimpleScriptable jsxGet_parent() { final WebWindow parentWebWindow = webWindow_.getParentWindow(); return (SimpleScriptable) parentWebWindow.getScriptObject(); }
/** * Returns the value of the top property. * @return the value of "top" */ public SimpleScriptable jsxGet_top() { final WebWindow topWebWindow = webWindow_.getTopWindow(); return (SimpleScriptable) topWebWindow.getScriptObject(); }
/** * Returns the window the frame contains, if any. * @return the window * @see <a href="http://www.mozilla.org/docs/dom/domref/dom_frame_ref5.html"> * Gecko DOM Reference</a> * @see <a href="http://msdn.microsoft.com/en-us/library/ms533692.aspx">MSDN documentation</a> */ public Window jsxGet_contentWindow() { return (Window) getFrame().getEnclosedWindow().getScriptObject(); }
/** * Returns the window the frame contains, if any. * @return the window * @see <a href="http://www.mozilla.org/docs/dom/domref/dom_frame_ref5.html"> * Gecko DOM Reference</a> * @see <a href="http://msdn.microsoft.com/en-us/library/ms533692.aspx">MSDN documentation</a> */ public Window jsxGet_contentWindow() { return (Window) getFrame().getEnclosedWindow().getScriptObject(); }
/** * Returns the window the frame contains, if any. * @return the window * @see <a href="http://www.mozilla.org/docs/dom/domref/dom_frame_ref5.html"> * Gecko DOM Reference</a> * @see <a href="http://msdn.microsoft.com/en-us/library/ms533692.aspx">MSDN documentation</a> */ public Window jsxGet_contentWindow() { return (Window) getFrame().getEnclosedWindow().getScriptObject(); }
/** {@inheritDoc} */ @Override protected void runJavaScript(final HtmlPage page) { final HtmlElement doc = page.getDocumentElement(); final Scriptable scriptable = (Scriptable) page.getEnclosingWindow().getScriptObject(); page.executeJavaScriptFunctionIfPossible(function_, scriptable, new Object[0], doc); }
/** {@inheritDoc} */ @Override protected void runJavaScript(final HtmlPage page) { final HtmlElement doc = page.getDocumentElement(); final Scriptable scriptable = (Scriptable) page.getEnclosingWindow().getScriptObject(); page.executeJavaScriptFunctionIfPossible(function_, scriptable, new Object[0], doc); }
/** * Returns the document the frame contains, if any. * @return <code>null</code> if no document is contained * @see <a href="http://www.mozilla.org/docs/dom/domref/dom_frame_ref4.html"> * Gecko DOM Reference</a> */ public HTMLDocument jsxGet_contentDocument() { return ((Window) getFrame().getEnclosedWindow().getScriptObject()).jsxGet_document(); }
/** * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br/> * * Initializes a new page for JavaScript. * @param newPage the new page */ public void initialize(final Page newPage) { WebAssert.notNull("newPage", newPage); if (scriptEngine_ != null) { ((Window) newPage.getEnclosingWindow().getScriptObject()).initialize(newPage); } }
/** {@inheritDoc} */ @Override protected void runJavaScript(final HtmlPage page) { final HtmlElement doc = page.getDocumentElement(); final Scriptable scriptable = (Scriptable) page.getEnclosingWindow().getScriptObject(); page.executeJavaScriptFunctionIfPossible(function_, scriptable, new Object[0], doc); }
/** * <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br/> * * Initializes a new page for JavaScript. * @param newPage the new page */ public void initialize(final Page newPage) { WebAssert.notNull("newPage", newPage); if (scriptEngine_ != null) { ((Window) newPage.getEnclosingWindow().getScriptObject()).initialize(newPage); } }
/** * Returns the document the frame contains, if any. * @return <code>null</code> if no document is contained * @see <a href="http://www.mozilla.org/docs/dom/domref/dom_frame_ref4.html"> * Gecko DOM Reference</a> */ public HTMLDocument jsxGet_contentDocument() { return ((Window) getFrame().getEnclosedWindow().getScriptObject()).jsxGet_document(); }
@Override public void initialize(WebWindow webWindow) { // Hook in the hosted-mode plugin after initializing the JS engine. super.initialize(webWindow); Window window = (Window) webWindow.getScriptObject(); window.defineProperty("__gwt_HostedModePlugin", new HostedModePluginObject(this, logger), ScriptableObject.READONLY); } }