- From: Jonas Sicking <jonas@sicking.cc>
- Date: Fri, 3 Jun 2011 14:51:59 -0700
- To: David Flanagan <dflanagan@mozilla.com>
- Cc: www-dom@w3.org
On Fri, Jun 3, 2011 at 2:34 PM, David Flanagan <dflanagan@mozilla.com> wrote: > Both Firefox and Chrome make the ownerDocument of a Document node null. > > The June 3rd spec just says: > > The ownerDocument attribute must return the Document node that the context > object is associated with, or null if there is none. > > The meaning of this depends on whether a node is "associated with" itself. > > But the (new, I think) algorithm to ensure that two node are in the same > document requires document.ownerDocument === document, or it will fail in > the case of inserting a doctype into a document. DOM Level 3 pretty explicitly says that document.ownerDocument === null http://www.w3.org/TR/DOM-Level-3-Core/core.html#node-ownerDoc However this was a part of the spec that I never liked, and I'd love to change it. Are there browsers that set document.ownerDocument === document? / Jonas
Received on Friday, 3 June 2011 21:52:57 UTC