Closed Bug 371628 Opened 13 years ago Closed 13 years ago

As of, FF not longer executes code injected through the innerHTML property of a document synchronously


(Core :: DOM: Core & HTML, defect)

1.8 Branch
Not set





(Reporter: tnarik, Unassigned)



(Keywords: regression)


(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv: Gecko/20070219 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv: Gecko/20070219 Firefox/

If you test the Gspace extension ( with FF, you'll never login the system.
This is due to the mechanism used and the way code gets executed on FF

Gspace uses a browser element to execute some javascript code extracted from the Gmail site and get some identifiers.
Previously, on FF, this code was executed just after the injection of code, before returning the control to the extension code, so the needed information was already created by the code.
As of FF, the inject code get executed after the extension code finishes, so it fails obtaining the needed identifiers.

Reproducible: Always

Steps to Reproduce:
1. Install Gspace on FF
2. You should log on the system with out problems.
3. Using the DOM inspector, you will see a gspace_gEnumFrame### browser element with some elements inside.

4. Install Gspace on FF
5. An "setting ik failed" message will always appear.
6. Using the DOM inspector, you will see a gspace_gEnumFrame### browser element with some elements inside, which Gspace couldn't find before.
Actual Results:  
Gspace doesn't work.

Expected Results:  
Gspace works.
Assignee: nobody → general
Component: Extension Compatibility → DOM
OS: Windows XP → All
Product: Firefox → Core
QA Contact: extension.compatibility → ian
Hardware: PC → All
Version: unspecified → 1.8 Branch
This might be the same as bug 371576, but it was also caused by the patch for bug 364692. The reporter has tested that the regression range matches that bug's landing.
Blocks: 364692
tnarik: if you could attach a "minimal extension" that shows the problem, that would be great.
Keywords: regression
This is a "not minimal" extension tracing the calling order of the innerHTML code and the extension code as alerts.
Not sure about other AJAX controls, but this could be the cause of a problem with the Telerik Web Tree (  As of the update to expanding tree view nodes causes the tree to collapse to a flat list showing the Text of each node before expanding again.
Alan, where? I've look at the demos here:
But I don't see any problems with it.
Could you file a new bug on the issue that you're seeing? And please mention the bug number here.
Hi Martijn, its a different TreeView control, this one here

Have added a bug report at and in the Telerik forums in case the bug is with their control.
It seems that previously assigning 
  browser.contentDocument.body.innerHTML = "";

, delays somehow the execution of code injected such as

Commenting the first line on the Gspace code (srcDoc.body.innerHTML = ""; at gactions.js) seems to fix the problem.
Hmm.. this is weird. Setting .innerHTML should never have executed scripts. A pile of sites broke when we made setting .innerHTML execute scripts so it was explicitly prohibited.

Can you attach a testcase that worked in
sicking, they're setting the innerHTML on a <script>.  Then appending the script.  That's exactly bug 371576, so given lack of evidence to the contrary after a week marking duplicate.
Closed: 13 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 371576
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.