Re: [DOMCore] overconstained DocumentType.ownerDocument

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 UTC