Firefox addon 以编程方式重新启动firefox扩展
我正在使用Mozilla插件sdk制作Firefox扩展。我在一个面板中显示一个特定的HTML页面。根据收到的特定事件,我希望重新加载扩展(而不仅仅是页面)。重新加载=重新运行main.js,就像浏览器重新启动时一样 仅重新加载HTML页面的问题在于,在重新加载时,页面工作程序仍然是旧的,并且在重新加载期间接收到的事件没有得到正确处理。与这些事件对应,您会得到以下错误:Firefox addon 以编程方式重新启动firefox扩展,firefox-addon,firefox-addon-sdk,Firefox Addon,Firefox Addon Sdk,我正在使用Mozilla插件sdk制作Firefox扩展。我在一个面板中显示一个特定的HTML页面。根据收到的特定事件,我希望重新加载扩展(而不仅仅是页面)。重新加载=重新运行main.js,就像浏览器重新启动时一样 仅重新加载HTML页面的问题在于,在重新加载时,页面工作程序仍然是旧的,并且在重新加载期间接收到的事件没有得到正确处理。与这些事件对应,您会得到以下错误: Timestamp: 4/11/13 12:34:20 PM Error: ubp-install: An exception
Timestamp: 4/11/13 12:34:20 PM
Error: ubp-install: An exception occurred.
Traceback (most recent call last):
File "resource://onebutton-at-user043-dot-com/addon-sdk/lib/sdk/panel.js", line 273, in _onHide
this._emit('hide');
File "resource://onebutton-at-user043-dot-com/addon-sdk/lib/sdk/deprecated/events.js", line 123, in _emit
return this._emitOnObject.apply(this, args);
File "resource://onebutton-at-user043-dot-com/addon-sdk/lib/sdk/deprecated/events.js", line 153, in _emitOnObject
listener.apply(targetObj, params);
File "resource://onebutton-at-user043-dot-com/ubp-install/lib/main.js", line 232, in
type: 'Application_reload'
File "resource://onebutton-at-user043-dot-com/addon-sdk/lib/sdk/content/worker.js", line 369, in
emit: function () self._emitEventToContent(Array.slice(arguments))
File "resource://onebutton-at-user043-dot-com/addon-sdk/lib/sdk/content/worker.js", line 404, in _emitEventToContent
throw new Error(ERR_FROZEN);
Error: The page is currently hidden and can no longer be used until it is visible again.
简而言之,我需要一种重新加载firefox扩展的方法。你能销毁页面工作程序并创建一个新的吗?