Re: [dom3core] WRONG_DOCUMENT_ERR

On Dec 2, 2005, at 5:20 AM, Anne van Kesteren wrote:

> On Fri, 02 Dec 2005 12:54:45 +0100, Ray Whitmer  
> <ray@personallegal.net> wrote:
>> Have you heard of Firefox?
>
> Last time I checked they did not have support for ownerDocument.  
> (And they violate this as well.)

ownerDocument works on the new and older versions of Firefox and  
Mozilla I have on my system.

Try the following:

<html>
<p id="foo">Test</p>
<script>
var foo = document.getElementById("foo")
var par = foo.parentNode
alert(foo.ownerDocument)
par.removeChild(foo)
alert(foo.ownerDocument)
</script>
</html>

It also works on Safari.  You may have confused this with something  
else.  I remember discussions going way back on this.  I think there  
could have been a very old version that might have errorred out if  
the node was removed, but I doubt that code was in a Firefox release.

Firefox may not be throwing the exception in cases of where the  
documents may be compatible (I have not checked), but this doesn't  
mean that they shouldn't, when claiming to be standards-compliant.   
It is a smaller violation but still a significant one to the  
consensus, which was formed with good reason.

Ray

Received on Friday, 2 December 2005 14:12:51 UTC