W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2005

Re: [dom3core] WRONG_DOCUMENT_ERR

From: Ray Whitmer <ray@personallegal.net>
Date: Fri, 2 Dec 2005 07:12:29 -0700
Message-Id: <9BB917A9-E8F4-435C-9D1B-A2B9D291FAF4@personallegal.net>
Cc: "Maciej Stachowiak" <mjs@apple.com>, "DOM mailing list" <www-dom@w3.org>
To: "Anne van Kesteren" <annevk@opera.com>


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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:58 GMT