/** {@inheritDoc} */ public void setEnclosedPage(final Page page) { super.setEnclosedPage(page); // we have updated a frame window by javascript write(); // so we have to disable future updates during initialization // see com.gargoylesoftware.htmlunit.html.HtmlPage.loadFrames() final WebResponse webResponse = page.getWebResponse(); if (webResponse instanceof StringWebResponse) { final StringWebResponse response = (StringWebResponse) webResponse; if (response.isFromJavascript()) { final BaseFrame frame = getFrameElement(); frame.setContentLoaded(); } } }
/** Creates an instance for a given frame. */ FrameWindow(final BaseFrame frame) { super(frame.getPage().getWebClient()); frame_ = frame; final WebWindowImpl parent = (WebWindowImpl) getParentWindow(); performRegistration(); parent.addChildWindow(this); }
/** * Returns the HTML page in which the <frame> or <iframe> tag is contained for this * frame window. This is a facility method for <code> * (HtmlPage) (getParentWindow().getEnclosedPage())</code>. * * @return the page in the parent window */ public HtmlPage getEnclosingPage() { return (HtmlPage) frame_.getPage(); }
/** {@inheritDoc} */ public WebWindow getParentWindow() { return frame_.getPage().getEnclosingWindow(); }
/** {@inheritDoc} A FrameWindow shares it's name with it's containing frame. */ @Override public void setName(final String name) { frame_.setNameAttribute(name); }
/** {@inheritDoc} A FrameWindow shares it's name with it's containing frame. */ @Override public String getName() { return frame_.getNameAttribute(); }