Java Examples for org.w3c.dom.html.HTMLIFrameElement
The following java examples will help you to understand the usage of org.w3c.dom.html.HTMLIFrameElement. These source code samples are taken from different open source projects.
Example 1
| Project: uncertainfuture-master File: AppletBrowser.java View source code |
/**
* Firefox on Mac has some issues with accessing HTML elements
* from applets and is currently not working.
*
* See http://forums.sun.com/thread.jspa?threadID=5391691.
*
* This method is an approach that doesn't work, but might be used
* as a starting point.
*/
private void getMacSidebar() {
// element.getOwnerDocument() // Get document from element
// applet.getDocumentBase() // Get URL for applet base
JSObject w = JSObject.getWindow(applet);
Object o = w.eval("getSidebar()");
Object o2 = w.eval("document.getElementById('sidebar')");
LogUtil.info("getSidebar(): " + o);
LogUtil.info("document.getElementById('sidebar'): " + o2 + ", " + o2.getClass());
LogUtil.info("sidebar object has class: " + o.getClass());
if (o instanceof HTMLIFrameElement) {
HTMLIFrameElement e = (HTMLIFrameElement) o;
e.setAttribute("class", "fooBar");
}
Class c = o.getClass();
}Example 2
| Project: jBrowserDriver-master File: ContextItem.java View source code |
JSObject selectedFrameDoc() {
synchronized (lock) {
if (frame != null && ancestors(engine.get().getDocument(), frame.node()) != null) {
if (frame.node() instanceof HTMLIFrameElement) {
Document doc = ((HTMLIFrameElement) frame.node()).getContentDocument();
if (doc instanceof JSObject) {
return (JSObject) doc;
}
}
if (frame.node() instanceof HTMLFrameElement) {
Document doc = ((HTMLFrameElement) frame.node()).getContentDocument();
if (doc instanceof JSObject) {
return (JSObject) doc;
}
}
}
frame = null;
Document doc = engine.get().getDocument();
if (doc instanceof JSObject) {
return (JSObject) doc;
}
return null;
}
}Example 3
| Project: Grendel-Scan-master File: HtmlUtils.java View source code |
private static boolean unnecessaryElement(final NodeImpl node) {
boolean unneccissary = true;
if (node instanceof HTMLAnchorElement || node instanceof HTMLAppletElement || node instanceof HTMLBaseElement || node instanceof HTMLBodyElement || node instanceof HTMLButtonElement || node instanceof HTMLDocument || node instanceof HTMLFormElement || node instanceof HTMLFrameElement || node instanceof HTMLFrameSetElement || node instanceof HTMLHeadElement || node instanceof HTMLHtmlElement || node instanceof HTMLIFrameElement || node instanceof HTMLImageElement || node instanceof HTMLInputElement || node instanceof HTMLIsIndexElement || node instanceof HTMLLinkElement || node instanceof HTMLMetaElement || node instanceof HTMLObjectElement || node instanceof HTMLOptGroupElement || node instanceof HTMLOptionElement || node instanceof HTMLParamElement || node instanceof HTMLScriptElement || node instanceof HTMLSelectElement || node instanceof HTMLTextAreaElement || node.getParentNode() instanceof HTMLTextAreaElement && node instanceof Text) {
unneccissary = false;
}
return unneccissary;
}Example 4
| Project: ui4j-master File: WebKitElement.java View source code |
public Optional<Document> getContentDocument() {
if (element instanceof HTMLFrameElement) {
DocumentImpl documentImpl = (DocumentImpl) ((HTMLFrameElementImpl) element).getContentDocument();
WebKitPageContext webkitPageContext = (WebKitPageContext) context;
Document document = webkitPageContext.getContentDocument(documentImpl, engine);
return Optional.of(document);
} else if (element instanceof HTMLIFrameElement) {
DocumentImpl documentImpl = (DocumentImpl) ((HTMLIFrameElement) element).getContentDocument();
WebKitPageContext webkitPageContext = (WebKitPageContext) context;
Document document = webkitPageContext.getContentDocument(documentImpl, engine);
return Optional.of(document);
}
return Optional.empty();
}Example 5
| Project: gngr-master File: NodeFilter.java View source code |
public boolean accept(final Node node) {
return (node instanceof HTMLFrameElement) || (node instanceof HTMLIFrameElement);
}Example 6
| Project: beowulf-master File: HTMLDocumentImpl.java View source code |
public boolean accept(Node node) {
return node instanceof org.w3c.dom.html2.HTMLFrameElement || node instanceof org.w3c.dom.html2.HTMLIFrameElement;
}