MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / loadFrames

Method loadFrames

src/main/java/org/htmlunit/html/HtmlPage.java:1997–2008  ·  view source on GitHub ↗

Loads the content of the contained frames. This is done after the page is completely loaded, to allow script contained in the frames to reference elements from the page located after the closing </frame> tag. @throws FailingHttpStatusCodeException if the server returns a failing status code AN

()

Source from the content-addressed store, hash-verified

1995 * {@link WebClientOptions#setThrowExceptionOnFailingStatusCode(boolean)} is set to {@code true}
1996 */
1997 void loadFrames() throws FailingHttpStatusCodeException {
1998 for (final BaseFrameElement frameElement : new ArrayList<>(frameElements_)) {
1999 // test if the frame should really be loaded:
2000 // if a script has already changed its content, it should be skipped
2001 // use == and not equals(...) to identify initial content (versus URL set to "about:blank")
2002 if (frameElement.getEnclosedWindow() != null
2003 && UrlUtils.URL_ABOUT_BLANK == frameElement.getEnclosedPage().getUrl()
2004 && !frameElement.isContentLoaded()) {
2005 frameElement.loadInnerPage();
2006 }
2007 }
2008 }
2009
2010 /**
2011 * Gives a basic representation for debugging purposes.

Callers 1

initializeMethod · 0.95

Calls 5

getEnclosedWindowMethod · 0.80
isContentLoadedMethod · 0.80
loadInnerPageMethod · 0.80
getUrlMethod · 0.65
getEnclosedPageMethod · 0.65

Tested by

no test coverage detected