[dom] cloneNode underspecified for attribute copying
Domenic Denicola via GitHub <[email protected]> Fri, 01 May 2015 22:55:55 +0000
| Newsgroups | gmane.comp.web.dom.general |
|---|---|
| Message-ID | <[email protected]> |
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