WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
159174
Main frame storage event never dispatched for localStorage/sessionStorage modifications
https://bugs.webkit.org/show_bug.cgi?id=159174
Summary
Main frame storage event never dispatched for localStorage/sessionStorage mod...
Joseph Pecoraro
Reported
2016-06-27 15:27:36 PDT
Summary: Main frame storage event never dispatched for localStorage/sessionStorage modifications Steps to Reproduce: 1. Inspect this page 2. js> window.onstorage = function(e) { console.log(e); }; localStorage.x = 123; => Expected console to log, it did not. Notes: - LayoutTests/storage/domstorage/events/basic.html shows that the storage event does fire for a subframe, but surprisingly it does not fire for the main frame
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-06-27 15:28:07 PDT
<
rdar://problem/27040485
>
Joseph Pecoraro
Comment 2
2016-06-27 16:51:32 PDT
MDN says, about the Storage Event: This won't work on the same page that is making the changes — it is really a way for other pages on the domain using the storage to sync any changes that are made. So if that is the case, this is behaving correctly.
Joseph Pecoraro
Comment 3
2016-06-27 17:00:22 PDT
<
https://html.spec.whatwg.org/multipage/webstorage.html#the-localstorage-attribute
>
> When the setItem(), removeItem(), and clear() methods are called on a Storage object x > that is associated with a local storage area, if the methods did not throw an exception > or "do nothing" as defined above, then for every Document object whose Window object's > localStorage attribute's Storage object is associated with the same storage area, > other than x, send a storage notification.
The operative words being "other than x". Seems like this behaves correctly, closing.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug