@Override public void execute() throws Exception { if (!src.isEmpty() && getSrcAttribute().equals(src)) { loadInnerPage(); } }
@Override public void execute() throws Exception { if (!src.isEmpty() && getSrcAttribute().equals(src)) { loadInnerPage(); } }
/** * Returns the value of URL loaded in the frame. * @return the value of this attribute */ @JsxGetter public String getSrc() { return getFrame().getSrcAttribute(); }
/** * Returns the value of URL loaded in the frame. * @return the value of this attribute */ @JsxGetter public String getSrc() { return getFrame().getSrcAttribute(); }
/** * Returns the value of URL loaded in the frame. * @return the value of this attribute */ @JsxGetter public String getSrc() { return getFrame().getSrcAttribute(); }
/** * Returns the value of URL loaded in the frame. * @return the value of this attribute */ @JsxGetter public String getSrc() { return getFrame().getSrcAttribute(); }
/** * Creates an instance of BaseFrame. * * @param qualifiedName the qualified name of the element type to instantiate * @param page the HtmlPage that contains this element * @param attributes the initial attributes */ protected BaseFrameElement(final String qualifiedName, final SgmlPage page, final Map<String, DomAttr> attributes) { super(qualifiedName, page, attributes); init(); if (null != page && page.isHtmlPage() && ((HtmlPage) page).isParsingHtmlSnippet()) { // if created by the HTMLParser the src attribute is not set via setAttribute() or some other method but is // part of the given attributes already. final String src = getSrcAttribute(); if (src != ATTRIBUTE_NOT_DEFINED && !WebClient.ABOUT_BLANK.equals(src)) { loadSrcWhenAddedToPage_ = true; } } }
/** * Creates an instance of BaseFrame. * * @param qualifiedName the qualified name of the element type to instantiate * @param page the HtmlPage that contains this element * @param attributes the initial attributes */ protected BaseFrameElement(final String qualifiedName, final SgmlPage page, final Map<String, DomAttr> attributes) { super(qualifiedName, page, attributes); init(); if (null != page && page.isHtmlPage() && ((HtmlPage) page).isParsingHtmlSnippet()) { // if created by the HTMLParser the src attribute is not set via setAttribute() or some other method but is // part of the given attributes already. final String src = getSrcAttribute(); if (src != ATTRIBUTE_NOT_DEFINED && !WebClient.ABOUT_BLANK.equals(src)) { loadSrcWhenAddedToPage_ = true; } } }
private void loadSrc() { loadSrcWhenAddedToPage_ = false; final String src = getSrcAttribute(); final AbstractJavaScriptEngine<?> jsEngine = getPage().getWebClient().getJavaScriptEngine(); // When src is set from a script, loading is postponed until script finishes // in fact this implementation is probably wrong: JavaScript URL should be // first evaluated and only loading, when any, should be postponed. if (!jsEngine.isScriptRunning() || src.startsWith(JavaScriptURLConnection.JAVASCRIPT_PREFIX)) { loadInnerPageIfPossible(src); } else { final Page pageInFrame = getEnclosedPage(); final PostponedAction action = new PostponedAction(getPage()) { @Override public void execute() throws Exception { if (!src.isEmpty() && getSrcAttribute().equals(src)) { loadInnerPage(); } } @Override public boolean isStillAlive() { // skip if page in frame has already been changed return super.isStillAlive() && pageInFrame == getEnclosedPage(); } }; jsEngine.addPostponedAction(action); } }
private void loadSrc() { loadSrcWhenAddedToPage_ = false; final String src = getSrcAttribute(); final AbstractJavaScriptEngine<?> jsEngine = getPage().getWebClient().getJavaScriptEngine(); // When src is set from a script, loading is postponed until script finishes // in fact this implementation is probably wrong: JavaScript URL should be // first evaluated and only loading, when any, should be postponed. if (!jsEngine.isScriptRunning() || src.startsWith(JavaScriptURLConnection.JAVASCRIPT_PREFIX)) { loadInnerPageIfPossible(src); } else { final Page pageInFrame = getEnclosedPage(); final PostponedAction action = new PostponedAction(getPage()) { @Override public void execute() throws Exception { if (!src.isEmpty() && getSrcAttribute().equals(src)) { loadInnerPage(); } } @Override public boolean isStillAlive() { // skip if page in frame has already been changed return super.isStillAlive() && pageInFrame == getEnclosedPage(); } }; jsEngine.addPostponedAction(action); } }
.getUrl() == WebClient.URL_ABOUT_BLANK) { String src = frame.getSrcAttribute(); if (src != null && !src.isEmpty()) { final URL url;
String source = getSrcAttribute(); if (source.isEmpty() || StringUtils.startsWithIgnoreCase(source, WebClient.ABOUT_SCHEME)) { source = WebClient.ABOUT_BLANK;
String source = getSrcAttribute(); if (source.isEmpty() || StringUtils.startsWithIgnoreCase(source, WebClient.ABOUT_SCHEME)) { source = WebClient.ABOUT_BLANK;