W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2010

Prototypes for adopted nodes

From: Andrew Oakley <andrew@ado.is-a-geek.net>
Date: Mon, 19 Jul 2010 11:16:20 +0100
Message-ID: <4C4425F4.9070609@ado.is-a-geek.net>
To: "www-dom@w3.org" <www-dom@w3.org>
What "script context" should nodes belong to if they are adopted from
one document to another?  By script context I mean which set of
prototype objects are used.  This doesn't seem to be mentioned in the
DOM 3 core adoptNode description.

I would expect the automatic adopting of nodes that browsers seem to be
doing (rather than throwing WRONG_DOCUMENT_ERR) would have the same
behaviour as using the adoptNode API.

On a related note which script context should be used if the
Document.create* APIs are used on different documents (e.g.
doc1.createTextNode.call(doc2, ...))?

I've uploaded a test case to http://ado.is-a-geek.net/www-dom/context/,
results don't seem to be consistent between different browsers.


Andrew Oakley
Received on Monday, 19 July 2010 10:09:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:16 UTC