private void init() { FrameWindow enclosedWindow = null; try { final HtmlPage htmlPage = getHtmlPageOrNull(); if (null != htmlPage) { // if loaded as part of XHR.responseXML, don't load content enclosedWindow = new FrameWindow(this); // put about:blank in the window to allow JS to run on this frame before the // real content is loaded final WebClient webClient = htmlPage.getWebClient(); final HtmlPage temporaryPage = webClient.getPage(enclosedWindow, new WebRequest(WebClient.URL_ABOUT_BLANK)); temporaryPage.setReadyState(READY_STATE_LOADING); } } catch (final FailingHttpStatusCodeException | IOException e) { // should never occur } enclosedWindow_ = enclosedWindow; }
private void init() { FrameWindow enclosedWindow = null; try { final HtmlPage htmlPage = getHtmlPageOrNull(); if (null != htmlPage) { // if loaded as part of XHR.responseXML, don't load content enclosedWindow = new FrameWindow(this); // put about:blank in the window to allow JS to run on this frame before the // real content is loaded final WebClient webClient = htmlPage.getWebClient(); final HtmlPage temporaryPage = webClient.getPage(enclosedWindow, new WebRequest(WebClient.URL_ABOUT_BLANK)); temporaryPage.setReadyState(READY_STATE_LOADING); } } catch (final FailingHttpStatusCodeException | IOException e) { // should never occur } enclosedWindow_ = enclosedWindow; }