Error implementing localStorage in Chrome? it explains the specification very well and how it behaves differently in Opera and IE9.
But what now?
This will really mess up my code (any code) that relies on implementation, one way in the browser, when it's different.
How can I check if an event is fired in a window that triggers it or not?
The only thing I can understand is to use setTimeout () to wait and see if the event is fired at the caller or not, and then do something if it is not. But, this can make some terrible mistakes when a storage event is called quickly.
In my case, I need to fire an event for all windows, but not all, except for those who call it. In Chrome, which correctly implements it in the specification, it is just a matter of adding an extra function after adding it to localStorage.setItem (), but then in IE, Firefox3.6 and Opera it will do it twice effectively. I could also have different browser-based code, but I have to test for compatibility, not the browser version.
Is there a way to "schedule" all browsers with localStorage support so that all events are handled equally at all?
source share