[Bug 28330] New: replace a child with node gets mutation record wrong when node is a DocumentFragment
[email protected] Wed, 25 Mar 2015 03:36:13 +0000
| Newsgroups | gmane.comp.web.dom.general |
|---|---|
| Message-ID | <[email protected]/Bugs/Public/> |
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28330
Bug ID: 28330
Summary: replace a child with node gets mutation record wrong
when node is a DocumentFragment
Product: WebAppsWG
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: DOM
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected], [email protected]
https://dom.spec.whatwg.org/#concept-node-replace
[[
Insert node into parent before reference child with the suppress observers flag
set.
Let nodes be node's children if node is a DocumentFragment node, and a list
containing solely node otherwise.
Queue a mutation record of "childList" for target parent with addedNodes nodes,
removedNodes a list solely containing child, nextSibling reference child, and
previousSibling child's previous sibling.
]]
In the case that the new node is a DocumentFragment, the Insert step removes
node's children (per https://dom.spec.whatwg.org/#concept-node-insert, Step 5).
Then "let nodes be" is always the empty list, and then the addedNodes in the
mutation record is empty.
Perhaps "let nodes be" should come before "insert node into parent."
--
You are receiving this mail because:
You are on the CC list for the bug.