W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2011

Re: [DOMCore] ownerDocument of a Document object

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 06 Jun 2011 08:55:34 -0700
Message-ID: <4DECF876.403@mit.edu>
To: David Flanagan <dflanagan@mozilla.com>
CC: www-dom@w3.org
On 6/6/11 6:48 AM, David Flanagan wrote:
> On 6/5/11 5:06 PM, Boris Zbarsky wrote:
>> Unfortunately, no. Invoking adoptNode can trigger arbitrary script
>> execution before it returns in several different ways, which can
>> change the ownerDocument of both 'new' and 'old'. Changing the
>> ownerDocument of 'old' while not messing with 'new', in particular,
>> will make the ownerDocuments not match.
>>
> Really? Because of mutation events? Fired synchronously?

Those and userdata adopt handlers.

> I believe that the latest DOM events spec draft has made mutation events optional.

If they're optional, behavior still needs to be defined when they're 
implemented.

> It seems to me that DOM Core is the place to define them (since it defines
> all the mutation methods) if they were going to be included in this
> spec... I'd argue that this spec doesn't need to include language that
> is only necessary on implementations that have implemented features
> outside of the spec.

I believe that if this is spec is going to have any bearing on reality 
it needs to address situations like this.

-Boris
Received on Monday, 6 June 2011 15:56:13 GMT

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