private static Object getFrameWindowByName(final HtmlPage page, final String name) { try { return page.getFrameByName(name).getScriptableObject(); } catch (final ElementNotFoundException e) { return NOT_FOUND; } }
private static Object getFrameWindowByName(final HtmlPage page, final String name) { try { return page.getFrameByName(name).getScriptableObject(); } catch (final ElementNotFoundException e) { return NOT_FOUND; } }
/** * {@inheritDoc} */ @Override protected boolean isJavaScriptInitializationNeeded() { return getScriptableObject() == null || !(getEnclosedPage().getWebResponse() instanceof StringWebResponse); // TODO: find a better way to distinguish content written by document.open(),... }
@Override protected SimpleScriptable getScriptableFor(final Object object) { if (alsoFrames && object instanceof BaseFrameElement) { return ((BaseFrameElement) object).getEnclosedWindow().getScriptableObject(); } return super.getScriptableFor(object); } };
/** * {@inheritDoc} */ @Override protected boolean isJavaScriptInitializationNeeded() { return getScriptableObject() == null || !(getEnclosedPage().getWebResponse() instanceof StringWebResponse); // TODO: find a better way to distinguish content written by document.open(),... }
@Override protected SimpleScriptable getScriptableFor(final Object object) { if (alsoFrames && object instanceof BaseFrameElement) { return ((BaseFrameElement) object).getEnclosedWindow().getScriptableObject(); } return super.getScriptableFor(object); } };
/** * 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(); }
final DomNode object = matchingElements.get(0); if (alsoFrames && object instanceof BaseFrameElement) { return ((BaseFrameElement) object).getEnclosedWindow().getScriptableObject();
final DomNode object = matchingElements.get(0); if (alsoFrames && object instanceof BaseFrameElement) { return ((BaseFrameElement) object).getEnclosedWindow().getScriptableObject();