/** * Returns a list containing all the frames (from frame and iframe tags) in this page. * @return a list of {@link FrameWindow} */ public List<FrameWindow> getFrames() { final List<FrameWindow> list = new ArrayList<>(frameElements_.size()); for (final BaseFrameElement frameElement : frameElements_) { list.add(frameElement.getEnclosedWindow()); } return list; }
/** * Returns a list containing all the frames (from frame and iframe tags) in this page. * @return a list of {@link FrameWindow} */ public List<FrameWindow> getFrames() { final List<FrameWindow> list = new ArrayList<>(frameElements_.size()); for (final BaseFrameElement frameElement : frameElements_) { list.add(frameElement.getEnclosedWindow()); } return list; }
/** * Returns the currently loaded page in the enclosed window. * This is a facility method for <code>getEnclosedWindow().getEnclosedPage()</code>. * @see WebWindow#getEnclosedPage() * @return the currently loaded page in the enclosed window, or {@code null} if no page has been loaded */ public Page getEnclosedPage() { return getEnclosedWindow().getEnclosedPage(); }
@Override protected void addElementIds(final List<String> idList, final List<DomNode> elements) { for (final DomNode next : elements) { final BaseFrameElement frameElt = (BaseFrameElement) next; final WebWindow window = frameElt.getEnclosedWindow(); final String windowName = window.getName(); if (windowName != null) { idList.add(windowName); } } } }
/** * Returns the currently loaded page in the enclosed window. * This is a facility method for <code>getEnclosedWindow().getEnclosedPage()</code>. * @see WebWindow#getEnclosedPage() * @return the currently loaded page in the enclosed window, or {@code null} if no page has been loaded */ public Page getEnclosedPage() { return getEnclosedWindow().getEnclosedPage(); }
@Override protected Scriptable getScriptableForElement(final Object obj) { final WebWindow window; if (obj instanceof BaseFrameElement) { window = ((BaseFrameElement) obj).getEnclosedWindow(); } else { window = ((FrameWindow) obj).getFrameElement().getEnclosedWindow(); } return window.getScriptableObject(); }
@Override protected void addElementIds(final List<String> idList, final List<DomNode> elements) { for (final DomNode next : elements) { final BaseFrameElement frameElt = (BaseFrameElement) next; final WebWindow window = frameElt.getEnclosedWindow(); final String windowName = window.getName(); if (windowName != null) { idList.add(windowName); } } } }
@Override protected Scriptable getScriptableForElement(final Object obj) { final WebWindow window; if (obj instanceof BaseFrameElement) { window = ((BaseFrameElement) obj).getEnclosedWindow(); } else { window = ((FrameWindow) obj).getFrameElement().getEnclosedWindow(); } return window.getScriptableObject(); }
/** * Remove our window also. * {@inheritDoc} */ @Override public void remove() { super.remove(); getEnclosedWindow().close(); } }
@Override protected SimpleScriptable getScriptableFor(final Object object) { if (alsoFrames && object instanceof BaseFrameElement) { return ((BaseFrameElement) object).getEnclosedWindow().getScriptableObject(); } return super.getScriptableFor(object); } };
/** * Remove our window also. * {@inheritDoc} */ @Override public void remove() { super.remove(); getEnclosedWindow().close(); } }
@Override protected SimpleScriptable getScriptableFor(final Object object) { if (alsoFrames && object instanceof BaseFrameElement) { return ((BaseFrameElement) object).getEnclosedWindow().getScriptableObject(); } return super.getScriptableFor(object); } };
/** * 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> */ @JsxGetter public WindowProxy getContentWindow() { return Window.getProxy(getFrame().getEnclosedWindow()); }
/** * 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> */ @JsxGetter public WindowProxy getContentWindow() { return Window.getProxy(getFrame().getEnclosedWindow()); }
/** * 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> */ @JsxGetter public WindowProxy getContentWindow() { return Window.getProxy(getFrame().getEnclosedWindow()); }
/** * 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> */ @JsxGetter public WindowProxy getContentWindow() { return Window.getProxy(getFrame().getEnclosedWindow()); }
/** * Returns the document the frame contains, if any. * @return {@code null} if no document is contained * @see <a href="http://www.mozilla.org/docs/dom/domref/dom_frame_ref4.html">Gecko DOM Reference</a> */ @JsxGetter public DocumentProxy getContentDocument() { return ((Window) getFrame().getEnclosedWindow().getScriptableObject()).getDocument_js(); }
/** * Returns the document the frame contains, if any. * @return {@code null} if no document is contained * @see <a href="http://www.mozilla.org/docs/dom/domref/dom_frame_ref4.html">Gecko DOM Reference</a> */ @JsxGetter public DocumentProxy getContentDocument() { return ((Window) getFrame().getEnclosedWindow().getScriptableObject()).getDocument_js(); }
/** * Returns the document the frame contains, if any. * @return {@code null} if no document is contained * @see <a href="http://www.mozilla.org/docs/dom/domref/dom_frame_ref4.html">Gecko DOM Reference</a> */ @JsxGetter public DocumentProxy getContentDocument() { return ((Window) getFrame().getEnclosedWindow().getScriptableObject()).getDocument_js(); }
/** * Returns the document the frame contains, if any. * @return {@code null} if no document is contained * @see <a href="http://www.mozilla.org/docs/dom/domref/dom_frame_ref4.html">Gecko DOM Reference</a> */ @JsxGetter public DocumentProxy getContentDocument() { return ((Window) getFrame().getEnclosedWindow().getScriptableObject()).getDocument_js(); }