Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox extension localStorage events

I am making a Firefox extension to determine when a "storage" event is fired from the localStorage.

In Firefox 3, I have this line to bind the storage event in the window to a function in the extension.

$(doc, doc).bind('storage', on_store());

This works in Firefox 3. However, this does not seem to get the event when it is tried in Firefox 4.

like image 891
Alexis Avatar asked Dec 05 '25 16:12

Alexis


1 Answers

The spec seems to suggest the storage event will fire on the window (so $(window).bind('storage', on_store) is the correct way to bind it).

like image 155
Tgr Avatar answered Dec 08 '25 09:12

Tgr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!