-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Node.contains() works contrary to specs #11479
Comments
According the the referenced article, the relevant WebKit bug was fixed in 522. I am running PhantomJS 1.9.1, which is based on Webkit 534.34, so I'm not sure if this is really the same bug. |
Actually, it behaves even weirder than I described originally. See this test code: var div1 = document.createElement("div"); For me, output is: < div >< div >This is a test text< /div >< /div > ok |
Your test results suggests that the currently used version of WebKit has an implementation of I don't see any pertinent bugs listed for this in the WebKit tracker, though. 😕 |
Other WebKit-based browsers (for example, Chrome) don't seem to have this problem. |
This is true of many of the problems that PhantomJS has but almost all of them are directly related to the old version of WebKit that we are currently using until PhantomJS 2.0 is released. |
So basically, this will be fixed by solving #10031, right? |
I see. Thanks for the info. (No ETA in the foreseeable future, right?) |
We were hoping for late September but we haven't been able to dedicate much time to it yet. 😕 |
FIxed in 2.0 |
According to the DOM Level 4 specs, Node.contains() should return True when called on itself.
Both Firefox and Chrome follows this specification, but PhantomJS does not seem to.
Check this:
var text = document.createTextNode("This is a test text");
console.log(text.contains(text));
This returns False in PhantomJS, while it's True everywhere else.
I think this is wrong.
The text was updated successfully, but these errors were encountered: