Bug 162479

Summary: Align Element.insertAdjacentHTML() with the specification
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, cmarcelo, commit-queue, darin, dbates, esprehn+autocc, kangil.han, rniwa, sam
Priority: P2 Keywords: WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://w3c.github.io/DOM-Parsing/#dom-element-insertadjacenthtml
Attachments:
Description Flags
Patch none

Description Chris Dumez 2016-09-22 19:16:41 PDT
Align Element.insertAdjacentHTML() with the specification:
- https://w3c.github.io/DOM-Parsing/#dom-element-insertadjacenthtml

In particular, the following changes are needed:
- It should be possible to call insertAdjacentHTML() on an element whose parent is a DocumentFragment. Currently WebKit throws a NO_MODIFICATION_ALLOWED_ERR.
- Calling insertAdjacentHTML() on child of the <html> element currently ends up creating duplicate body / head elements.

Firefox agrees with the specification.
Comment 1 Chris Dumez 2016-09-22 19:24:33 PDT
Created attachment 289650 [details]
Patch
Comment 2 Chris Dumez 2016-09-23 09:26:52 PDT
Comment on attachment 289650 [details]
Patch

Clearing flags on attachment: 289650

Committed r206308: <http://trac.webkit.org/changeset/206308>
Comment 3 Chris Dumez 2016-09-23 09:26:58 PDT
All reviewed patches have been landed.  Closing bug.