[英]Firefox extension localStorage events
I am making a Firefox extension to determine when a "storage" event is fired from the localStorage. 我正在制作Firefox扩展,以确定何时从localStorage触发“存储”事件。
In Firefox 3, I have this line to bind the storage event in the window to a function in the extension. 在Firefox 3中,我有这一行将窗口中的存储事件绑定到扩展中的函数。
$(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. 这适用于Firefox 3.但是,当在Firefox 4中尝试时,这似乎不会得到事件。
该规范似乎暗示storage
事件将在窗口上触发(因此$(window).bind('storage', on_store)
是绑定它的正确方法)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.