Re: Web DOM Core

On Mon, Sep 6, 2010 at 7:20 PM, Anne van Kesteren <annevk@opera.com> wrote:
> On Mon, 06 Sep 2010 21:29:57 +0200, Ian Hickson <ian@hixie.ch> wrote:
>>
>> On Mon, 6 Sep 2010, Anne van Kesteren wrote:
>>>
>>> This alternative would not throw HIERARCHY_REQUEST_ERR as much (maybe
>>> even not at all)
>>
>> Can you elaborate on this particular part? I've assumed in HTML5 that,
>> e.g., text nodes can never have Element children; is that a false
>> assumption now?
>
> My bad! I meant WRONG_DOCUMENT_ERR.

For what it's worth, we still throw WRONG_DOCUMENT_ERR in a few places in gecko:

http://mxr.mozilla.org/mozilla-central/search?string=WRONG_DOCUMENT_ERR&find=\.cpp

Some, but likely not all, of these can and should probably be removed.
For example it makes sense that if during the call to adoptNode
(implicit or explicit), if any UserDataHandler readopts the node to
another owner document, then it makes sense for adoptNode to throw
WRONG_DOCUMENT_ERR.

/ Jonas

Received on Tuesday, 7 September 2010 08:54:21 UTC