[Webkit-unassigned] [Bug 226808] New: outerHTML setter behaves differently from Chrome/Firefox

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 9 02:15:21 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=226808

            Bug ID: 226808
           Summary: outerHTML setter behaves differently from
                    Chrome/Firefox
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: zyscoder at gmail.com

Steps to reproduce:

(1) Open a tab and navigate to https://www.cdc.gov/;
(2) Run the following code in the Console of Devtools:
```
document.getElementById('sas').outerHTML = "any_str";
```
(3) Then this code would throw a NoModificationAllowedError exception.

Actual results:

this code would throw a NoModificationAllowedError exception: `NoModificationAllowedError: The object can not be modified.`

Expected results:

In my test, both Chrome and Firefox would not throw any exceptions. https://w3c.github.io/DOM-Parsing/#outerhtml says `If parent is a Document, throw a "NoModificationAllowedError" DOMException.` Since the parent node is not a Document, maybe something wrong with the outerHTML setter.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210609/51ec08e9/attachment-0001.htm>


More information about the webkit-unassigned mailing list