[whatwg] StorageEvents on Storage mutation

Brady Eidson beidson at apple.com
Fri Apr 4 13:42:07 PDT 2008


 From section 4.10.2:
-----
When the setItem() method is invoked, events are fired on other  
HTMLDocument objects that can access the newly stored data, as defined  
in the sections on the sessionStorage and localStorage attributes.

The removeItem(key) method must cause the key/value pair with the  
given key to be removed from the list associated with the object, if  
it exists. If no item with that key exists, the method must do nothing.
-----
The SessionStorage and LocalStorage sections go on to mention only  
firing events resulting from setItem().  It seems kind of weird that  
we fire StorageEvents for one form of mutation of a Storage object,  
but not for the other form.

Shouldn't removeItem() cause a StorageEvent to fire, as well?  If this  
was a purposeful omission, I'm curious as to why!  :)

~Brady



More information about the whatwg mailing list