Closed
Bug 967773
Opened 12 years ago
Closed 12 years ago
older content script file is still running and giving errors, even after changing by popup.contentScriptFile = self.data.url("new.js"); on some onclick event
Categories
(Add-on SDK Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: amitdhiman309, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release)
Build ID: 20140126004002
Steps to reproduce:
var panel = require("sdk/panel");
var data = require("sdk/self").data;
var popup = panel.Panel({
width: 350,
height: 200,
contentURL: data.url("popup.html"),
contentScriptFile: data.url("old.js")
});
var widget = widgets.Widget({
id: "Password",
label: "Secure-Password",
contentURL: data.url("images/favicon.ico"),
contentScriptFile: data.url("js/click-listener.js"),
onClick: function() {
if(some_my_flag) {
popup.contentScriptFile = data.url("new.js");
popup.contentFile = data.url("new.html");
}
}
});
Actual results:
The above code is what i Used .
It is loading "new.html" thats fine. But Old script is still running .
Is there any way to unload "old.js"
Expected results:
I have overwritten popup.contentScriptFile But even though old script is running on events .and new script is not working.
according to me new.js should handle the events and old.js should unload from memory .
Comment 1•12 years ago
|
||
This does not appear to be reporting a Firefox security bug: unhiding.
Unless I'm mistaken this looks like the Add-on SDK so I'll move the bug. But it also looks more like a help request than a bug report so you might not get much feedback here... I'd try our addon help forums like IRC channels or newsgroups.
Group: core-security
Component: Untriaged → General
Product: Firefox → Add-on SDK
Version: 28 Branch → unspecified
Comment 2•12 years ago
|
||
(In reply to amitdhiman309 from comment #0)
> onClick: function() {
> if(some_my_flag) {
> popup.contentScriptFile = data.url("new.js");
> popup.contentFile = data.url("new.html");
> }
> }
there is no property named `contentFile`, you probably meant to set `contentURL` here. check out the documentation at:
https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/panel
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•