[Bug 17541] Carefully think through how Range.insertNode should behave when the node to be inserted is already at the beginning of the range

[email protected]
Newsgroups gmane.comp.web.dom.general
Message-ID <[email protected]/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17541

Aryeh Gregor <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #6 from Aryeh Gregor <[email protected]> ---
This has an undesired side effect I spotted while updating the tests -- if the
eventual insertion will fail, we still removed the node from its parent.  E.g.,
if you have a range in the middle of a text node and try
range.insertNode(document.doctype), we will now remove the doctype from its
current position and then fail to insert it.  Maybe we should test that the
node can actually be inserted at the current position before doing any DOM
mutations?  We've avoided doing that to date, so e.g. we will split a text node
even if the eventual insert will fail.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.