【发布时间】:2011-01-18 10:47:58
【问题描述】:
我正在制作一个 Firefox 扩展以确定何时从 localStorage 触发“存储”事件。
在 Firefox 3 中,我有这一行将窗口中的存储事件绑定到扩展中的函数。
$(doc, doc).bind('storage', on_store());
这在 Firefox 3 中有效。但是,在 Firefox 4 中尝试时似乎没有收到事件。
【问题讨论】:
-
您是否尝试过使用像
addEventListener这样的非 JQuery 方法,只是想看看 Firefox 4 是否改变了一些东西,使得在扩展中使用 JQuery 变得更加困难? -
为什么是
on_store()而不是on_store?on_store()是否返回函数?
标签: javascript jquery firefox-addon local-storage firefox4