W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2011

[Bug 15350] New: Range.insertNode() into the middle of a comment

From: <bugzilla@jessica.w3.org>
Date: Tue, 27 Dec 2011 20:25:44 +0000
To: www-dom@w3.org
Message-ID: <bug-15350-4009@http.www.w3.org/Bugs/Public/>

           Summary: Range.insertNode() into the middle of a comment
           Product: WebAppsWG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DOM
        AssignedTo: annevk@opera.com
        ReportedBy: ayg@aryeh.name
         QAContact: member-webapi-cvs@w3.org
                CC: mike@w3.org, www-dom@w3.org


data:text/html,<!DOCTYPE html>
var range = document.createRange();
range.setStart(document.head.lastChild, 2);

Firefox 12.0a1 and Chrome 17 dev throw HierarchyRequestError.  Opera Next 12.00
alpha splits the comment node, like <!--ab-->def<!--c-->.  I don't have IE
handy to test -- could someone tell me what it does?  The spec says to insert
the new text node immediately before the comment node, so you get something
like def<!--abc-->.

Throwing seems much saner than what the spec says.  is there any reason not to
change the spec to require that, like Gecko/WebKit (and maybe IE too for all I
know)?  I don't know why I specced it this way to start with . . .

Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Tuesday, 27 December 2011 20:25:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:18 UTC