Add-On SDK (v778701a) Toggling PageMod with instant contentStyle but the script need to refreshed

RESOLVED DUPLICATE of bug 708190

Status

Add-on SDK
General
RESOLVED DUPLICATE of bug 708190
5 years ago
5 years ago

People

(Reporter: withered-flowers, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
Build ID: 20111220165912

Steps to reproduce:

I use the PageMod, with the Toggle (On/Off) Button, and inside the pageMod, there's a contentStyle and contentScript attached


Actual results:

when i switched on the button from off (initial condition) to on, the contentStyle is instantly working, but the contentScript which is attached to the pageMod doesnt work (need the page refreshed in order to to that)


Expected results:

does the contentStyle is instantly working if we have activated the pageMod like that?

PS:
from here below is the sample code from my pageMod
pageMod.PageMod ({
			include: ["http://*", "https://*"],
			contentScriptWhen: "ready",
			contentScript:  'document.body.style.display = "block"; document.body.innerHTML = ' +
							'"<h1>this page has been eaten</h1>";' ,
			contentStyle: "body {display: none; background-color: #FFCCFF!important}"
		});
If this bug is about getting content scripts to apply instantly like content styles, that's bug 708190.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 708190
You need to log in before you can comment on or make changes to this bug.