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

Re: [DOMCore] overconstained DocumentType.ownerDocument

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 24 Jun 2011 15:43:36 +0200
To: "David Flanagan" <dflanagan@mozilla.com>, Ms2ger <ms2ger@gmail.com>
Cc: www-dom@w3.org
Message-ID: <op.vxk1qyfi64w2qv@anne-van-kesterens-macbook-pro.local>
On Fri, 03 Jun 2011 10:26:06 +0200, Ms2ger <ms2ger@gmail.com> wrote:
> On 06/02/2011 11:05 PM, David Flanagan wrote:
>> In §5.5.1, the algorithms for createDocument() and createHTMLDocument()
>> both say to set the ownerDocument property of the DocumentType object
>> and then to append that node to the new document.
>>
>> But in §5.3, step 3 of the appendChild() algorithm will raise an
>> exception if the ownerDocument has already been set.
>
> Good catch. I've tried to clarify this by having createDocument() and  
> createHTMLDocument() rely on appendChild() to set the ownerDocument.
>
> http://dvcs.w3.org/hg/domcore/rev/1ca6aabc0984

Can you revert this change? I do not think there was a problem before as  
it used "append" and not specifically the appendChild() method so no  
exception would be raised. Using appendChild() is problematic as that will  
likely have to do something with mutation listeners and we do not want  
that here.


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Friday, 24 June 2011 13:44:22 GMT

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