Bug 162479 - Align Element.insertAdjacentHTML() with the specification
Summary: Align Element.insertAdjacentHTML() with the specification
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://w3c.github.io/DOM-Parsing/#do...
Keywords: WebExposed
Depends on:
Reported: 2016-09-22 19:16 PDT by Chris Dumez
Modified: 2016-09-23 09:26 PDT (History)
10 users (show)

See Also:

Patch (8.75 KB, patch)
2016-09-22 19:24 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
Comment 2 Chris Dumez 2016-09-23 09:26:52 PDT
Comment on attachment 289650 [details]

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.