我正在制作一个 Firefox 扩展以确定何时从 localStorage 触发“存储”事件。
在 Firefox 3 中,我有这一行将窗口中的存储事件绑定到扩展中的函数。
$(doc, doc).bind('storage', on_store());
这在 Firefox 3 中有效。但是,在 Firefox 4 中尝试时,这似乎没有得到事件。
我正在制作一个 Firefox 扩展以确定何时从 localStorage 触发“存储”事件。
在 Firefox 3 中,我有这一行将窗口中的存储事件绑定到扩展中的函数。
$(doc, doc).bind('storage', on_store());
这在 Firefox 3 中有效。但是,在 Firefox 4 中尝试时,这似乎没有得到事件。
该规范似乎表明该storage
事件将在窗口上触发($(window).bind('storage', on_store)
绑定它的正确方法也是如此)。