[Webkit-unassigned] [Bug 216533] New: Modifying object created by Object.create from the prototype of HTMLElement modifies the original object
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 15 02:21:45 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=216533
Bug ID: 216533
Summary: Modifying object created by Object.create from the
prototype of HTMLElement modifies the original object
Product: WebKit
Version: Safari 13
Hardware: Macintosh
OS: macOS 10.15
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: bashorov at gmail.com
```
var p = Object.create(HTMLElement.prototype);
p.constructor = "foo";
console.log("!!!" + HTMLElement.prototype.constructor)
```
For Safari it prints:
```
!!!foo
```
For Chrome it prints:
```
!!!function HTMLElement() { [native code] }
```
For non HTML elements it works as expected.
--
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/20200915/af2d4f4d/attachment.htm>
More information about the webkit-unassigned
mailing list