本文整理了Java中com.gargoylesoftware.htmlunit.javascript.host.Window.setDomNode()
方法的一些代码示例,展示了Window.setDomNode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.setDomNode()
方法的具体详情如下:
包路径:com.gargoylesoftware.htmlunit.javascript.host.Window
类名称:Window
方法名:setDomNode
暂无
代码示例来源:origin: net.disy.htmlunit/htmlunit
/**
* Initialize the object.
* @param enclosedPage the page containing the JavaScript
*/
public void initialize(final Page enclosedPage) {
if (enclosedPage instanceof HtmlPage) {
final HtmlPage htmlPage = (HtmlPage) enclosedPage;
// Windows don't have corresponding DomNodes so set the domNode
// variable to be the page. If this isn't set then SimpleScriptable.get()
// won't work properly
setDomNode(htmlPage);
eventListenersContainer_ = null;
WebAssert.notNull("document_", document_);
document_.setDomNode(htmlPage);
}
}
代码示例来源:origin: org.jvnet.hudson/htmlunit
/**
* Initialize the object.
* @param enclosedPage the page containing the JavaScript
*/
public void initialize(final Page enclosedPage) {
if (enclosedPage instanceof HtmlPage) {
final HtmlPage htmlPage = (HtmlPage) enclosedPage;
// Windows don't have corresponding DomNodes so set the domNode
// variable to be the page. If this isn't set then SimpleScriptable.get()
// won't work properly
setDomNode(htmlPage);
eventListenersContainer_ = null;
WebAssert.notNull("document_", document_);
document_.setDomNode(htmlPage);
}
}
代码示例来源:origin: org.jenkins-ci/htmlunit
/**
* Initialize the object.
* @param enclosedPage the page containing the JavaScript
*/
public void initialize(final Page enclosedPage) {
if (enclosedPage instanceof HtmlPage) {
final HtmlPage htmlPage = (HtmlPage) enclosedPage;
// Windows don't have corresponding DomNodes so set the domNode
// variable to be the page. If this isn't set then SimpleScriptable.get()
// won't work properly
setDomNode(htmlPage);
eventListenersContainer_ = null;
WebAssert.notNull("document_", document_);
document_.setDomNode(htmlPage);
}
}
代码示例来源:origin: net.sourceforge.htmlunit/htmlunit
/**
* Initialize the object.
* @param enclosedPage the page containing the JavaScript
*/
public void initialize(final Page enclosedPage) {
if (enclosedPage != null && enclosedPage.isHtmlPage()) {
final HtmlPage htmlPage = (HtmlPage) enclosedPage;
// Windows don't have corresponding DomNodes so set the domNode
// variable to be the page. If this isn't set then SimpleScriptable.get()
// won't work properly
setDomNode(htmlPage);
clearEventListenersContainer();
WebAssert.notNull("document_", document_);
document_.setDomNode(htmlPage);
}
}
代码示例来源:origin: HtmlUnit/htmlunit
/**
* Initialize the object.
* @param enclosedPage the page containing the JavaScript
*/
public void initialize(final Page enclosedPage) {
if (enclosedPage != null && enclosedPage.isHtmlPage()) {
final HtmlPage htmlPage = (HtmlPage) enclosedPage;
// Windows don't have corresponding DomNodes so set the domNode
// variable to be the page. If this isn't set then SimpleScriptable.get()
// won't work properly
setDomNode(htmlPage);
clearEventListenersContainer();
WebAssert.notNull("document_", document_);
document_.setDomNode(htmlPage);
}
}
代码示例来源:origin: net.disy.legato/legato-testing
@SuppressWarnings("deprecation")
protected Scriptable getWindow() {
final WebClient webClient = new WebClient(getBrowserVersion());
final WebWindow webWindow = webClient.openWindow(null, "main");
final Window window = (Window) webWindow.getScriptObject();
final WebResponse webResponse = new StringWebResponse(getPageString(),
getPageURL());
HtmlPage page = null;
try {
page = HTMLParser.parseHtml(webResponse, webWindow);
} catch (final IOException ioex) {
throw new AssertionError(ioex);
}
window.setDomNode(page);
return window;
//return window;
}
代码示例来源:origin: net.disy.htmlunit/htmlunit
if (openerPage != null) {
final Window jsWindow = (Window) window.getScriptObject();
jsWindow.setDomNode(openerPage);
jsWindow.jsxGet_document().setDomNode(openerPage);
代码示例来源:origin: org.jvnet.hudson/htmlunit
if (openerPage != null) {
final Window jsWindow = (Window) window.getScriptObject();
jsWindow.setDomNode(openerPage);
jsWindow.jsxGet_document().setDomNode(openerPage);
代码示例来源:origin: org.jenkins-ci/htmlunit
if (openerPage != null) {
final Window jsWindow = (Window) window.getScriptObject();
jsWindow.setDomNode(openerPage);
jsWindow.jsxGet_document().setDomNode(openerPage);
内容来源于网络,如有侵权,请联系作者删除!