var range = document.createRange();
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 . . .
IE9 throws an exception too (the same).
Thanks for verifying.