[Webkit-unassigned] [Bug 172687] New: Can't use Object.defineProperty() to add an item to a DOMStringMap or Storage
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun May 28 17:36:23 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=172687
Bug ID: 172687
Summary: Can't use Object.defineProperty() to add an item to a
DOMStringMap or Storage
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Bindings
Assignee: webkit-unassigned at lists.webkit.org
Reporter: sam at webkit.org
CC: cdumez at apple.com
Created attachment 311447
--> https://bugs.webkit.org/attachment.cgi?id=311447&action=review
Test case
Using Object.defineProperty() to add a item to a DOMStringMap does not seem to work. Given an dataset create like so:
let element = document.createElement("div");
element.dataset["a"] = "1";
element.dataset["b"] = "2";
If you try to add an additional item like so:
Object.defineProperty(element.dataset, "key", {
value: 'value'
});
The element remains unchanged (This is shown in the test case by printing out element.outerHTML).
--
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/20170529/b6df87c6/attachment.html>
More information about the webkit-unassigned
mailing list