| Summary: | localStorage keys are not enumerable | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Mariusz Nowak <medikoo+webkit.org> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | ashvayka |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=166835 | ||
(In reply to Mariusz Nowak from comment #0) > Strictly Webkit bug, all other engines behave ok. Thank you for the report! WebKit's getOwnPropertySlot() used to unconditionally set PropertyAttribute::DontEnum for named getter properties, causing this bug. This was fixed in r210667. WPT coverage: https://github.com/web-platform-tests/wpt/blob/dbc7edfaa96e559b9aa34a9c898a1ad54d877b58/webstorage/storage_enumerate.html#L53. |
localStorage.foo = 'bar'; localStorage.foo; // 'bar' Object.keys(localStorage); // ['foo'] localStorage.propertyIsEnumerable('foo'); // false (should be true) Strictly Webkit bug, all other engines behave ok.