This is just a guess, but I suspect your problem comes from line 53 of the DOMImplTrident.isOrHasChildImpl method.
return (parent === child) || parent.contains(child);
I also assume that you encountered your errors in IE10? The reason I think you're working against IE10 is because GWT does not officially support IE10 with a separate DOM implementation. In the end, he will use the implementation of DOMImplIE9 in IE10, which in turn uses the above method from DOMImplTrident to implement 'isOrHasChild'. I am wondering if line 47
if (parent.nodeType == 9) {
it doesnβt actually return 9 for the node document and is thereby discarded into the else statement for the node document and explodes when it tries to access the contains method. Perhaps IE10 does not implement these node methods in the same way as previous versions of IE? Not sure.
I do not have IE10 to test this theory, but this may be a good start. You can create your own JSNI method that will make similar node calls to test the theory and see if "document.nodeType" returns 9, or if "node.contains" explodes on different types of nodes.
If that turns out to be a problem. You can try several things to fix / avoid the problem.
Try connecting GWT.setUncaughtExceptionHandler () at your entry point and just ignore the error.
Insert a try / catch block of code in one of your methods that raises the problem code and ignores the exception.
Try adding the following meta tag to your html file and see if rendering will work in IE10, since IE9 solves the problem.
<meta http-equiv="X-UA-Compatible" content="IE=9" />
Create your own DOMImpl, which extends DOMImplIE9 and overrides the isOrHasChild method using its own method in which you control what is happening. for instance
package com.google.gwt.dom.client; public class DOMImplIE9Custom extends DOMImplIE9 { @Override public boolean isOrHasChild(Node parent, Node child) {
Then you use deferred binding to switch DOMImplIE9 with your custom implementation like this:
<replace-with class="com.google.gwt.dom.client.DOMImplIE9Custom"> <when-type-is class="com.google.gwt.dom.client.DOMImpl"/> <when-property-is name="user.agent" value="ie9"/> </replace-with>
Even if I am leaving the base and you are not using IE10, you can still try the above ideas to get around this problem. Either this, or make a final correction and stop using IE in general and avoid many hours of stress :) I hope that helps you at least on the right track.
source share