3 ms·
> Where do the standards say it ought to work? The wording has not changed since the 2016 version of the DOM Parsing and Serialization standard [0]: > On sett
by LegionMammal978 4y ago
> Where do the standards say it ought to work?
The wording has not changed since the 2016 version of the DOM Parsing and Serialization standard [0]:
> On setting, the following steps must be run: 1. Let parent be the context object's parent. [...] 4. If parent is a DocumentFragment, let parent be a new Element with
> - body as its local name,
> - The HTML namespace as its namespace, and
> - The context object's node document as its node document.
But Blink instead throws a DOMException with name "NoModificationAllowedError" and message "Failed to set the 'outerHTML' property on 'Element': This element's parent is of type '#document-fragment', which is not an element node." This was filed as a Chromium bug last December and assigned a week later [1].
[0] https://www.w3.org/TR/2016/WD-DOM-Parsing-20160517/#widl-Element-outerHTML https://www.w3.org/TR/2016/WD-DOM-Parsing-20160517/#widl-Ele...
[1] https://crbug.com/1403060 https://crbug.com/1403060