[dom] cloneNode underspecified for attribute copying

domenic has just created a new issue for 
https://github.com/whatwg/dom:

== cloneNode underspecified for attribute copying ==
The spec says:

> Copy the following from node to copy, depending on the type of node:
 
> ...
> (If Element) Its namespace, namespace prefix, local name, and its 
attribute list.

Copying the attribute list is underspecified. It seems like it could 
mean any of the following:

1. Set _copy_@[[attributeList]] to _node_@[[attributeList]], i.e., 
maintain a pointer, so that manipulating either element will affect 
the other.
2. Loop through _node_@[[attributeList]] and append each attribute to 
_copy_@[[attributeList]]. In this case, adding or removing attributes 
from _copy_ will not affect _node_, but updating existing ones will.
3. Loop through _node_@[[attributeList]] and create new `Attr` objects
 to append to _copy_@[[attributeList]].

See https://github.com/whatwg/dom/issues/30

Received on Friday, 1 May 2015 22:55:56 UTC