-
Bug
-
Resolution: Duplicate
-
P4
-
fx2.1
In DOM Level 2 and Level 3, there is two methods for testing features availability and using these features, but responses are not coherent:
final WebEngine engine = ...; // after WebView initalization and addition of content
final Document document = engine.getDocument();
final boolean supported = document.isSupported("Traversal", "2.0");
System.err.println("Supported: " + supported); // write "Supported: true"
if (supported) {
final DocumentTraversal traversal = (DocumentTraversal) document.getFeature("Traversal", "2.0");
// fail with following stack trace:
// java.lang.UnsupportedOperationException: Not supported yet.
// at com.sun.webpane.webkit.dom.NodeImpl.getFeature(NodeImpl.java:552)
// [...]
final WebEngine engine = ...; // after WebView initalization and addition of content
final Document document = engine.getDocument();
final boolean supported = document.isSupported("Traversal", "2.0");
System.err.println("Supported: " + supported); // write "Supported: true"
if (supported) {
final DocumentTraversal traversal = (DocumentTraversal) document.getFeature("Traversal", "2.0");
// fail with following stack trace:
// java.lang.UnsupportedOperationException: Not supported yet.
// at com.sun.webpane.webkit.dom.NodeImpl.getFeature(NodeImpl.java:552)
// [...]
- relates to
-
JDK-8089511 WebView claims it supports "Views" feature but throws UnsupportedOperationException on usage
-
- Open
-