RESOLVED DUPLICATE of bug 154627154594
new Range().createContextualFragment() throws DOM Exception 9
https://bugs.webkit.org/show_bug.cgi?id=154594
Summary new Range().createContextualFragment() throws DOM Exception 9
besworks
Reported 2016-02-23 10:26:15 PST
After creating a Range object using the constructor the createContextualFragment method throws DOM Exception 9 rather than returning a DocumentFragment object as expected. If Range.setStart and Range.setEnd are called to set the Range's boundaries then createContextualFragment works as expected. Looking at Range.cpp I can see that createContextualFragment checks if startContainer is an HTMLElement but the Range constructor sets startContainer as the global document object which is an HTMLDocument and therefore fails this check.
Attachments
Chris Dumez
Comment 1 2016-02-23 20:07:55 PST
I am about to fix this via Bug 154627. *** This bug has been marked as a duplicate of bug 154627 ***
Note You need to log in before you can comment on or make changes to this bug.