Closed
Bug 1142551
Opened 10 years ago
Closed 7 years ago
Setting panel.contentURL to the current URL of the panel stops content Script
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(tracking-b2g:backlog)
RESOLVED
INCOMPLETE
tracking-b2g | backlog |
People
(Reporter: sajirdalas, Unassigned)
References
Details
Attachments
(1 file)
36.50 KB,
application/x-tar
|
Details |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20150306140254
Steps to reproduce:
First time filing a bug, sorry for any **** explanations.
Changing the panel.contentURL property usually updates the panel's content immediately and re-runs the content script.
While building an add-on I had a panel that would display information relevant to the current tab. When the user switched tabs I tried resseting the DOM of the panel by setting the contentURL again.
Actual results:
If the panel.contentURL is set to URL that is already on the panel the content script is stopped, it stops responding to port messages and is not re-run.
//panel.contentURL is currently self.data.url("panel.html")
panel.contentURL = self.data.url("panel.html");
panel.port.once("scriptReady",function(){
//This is never going to be run. The content script is not going to answer
});
The content script stays that way until the contentURL is set to something diferent.
Tested both on Firefox 36.0.1 and nightly 39.0a1.
Expected results:
Setting the panel.contentURL to the panel's current URL either does nothing or resets the DOM and re runs the script.
I have attached a test plugin I was using to verify this bug. It sets the contentURL if you go to either reddit.com or google.com. If you press the button main.js sends a message through port to panel.js that logs. If you go into any of those two websites and refresh (forcing conteltURL to be set twice to the same value) and click the button nothing is logged.
[Tracking Requested - why for this release]:
tracking-b2g:
--- → backlog
Comment 2•7 years ago
|
||
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•