Closed Bug 590968 Opened 14 years ago Closed 14 years ago

load content scripts on document-element-inserted when contentScriptWhen is "start"

Categories

(Add-on SDK Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 596018

People

(Reporter: myk, Assigned: myk)

References

Details

Attachments

(1 file)

When the value of contentScriptWhen is "start" (the default value), we should load content scripts when receiving the document-element-inserted notification instead of the content-document-global-created notification, since JavaScript libraries like jQuery don't work when loaded on the earlier notification, because they expect the document element to be available, and that element is not available until document-element-inserted.

Note: this depends on the change in bug 579764.  Unless we can backport and land that change on the Gecko 1.9.2 branch, making this change means breaking compatibility with Firefox 3.6, at least for APIs that depend on ContentSymbiont.

Here's the patch, which won't actually work until bug 579764 lands.
Attachment #469514 - Flags: review?(dietrich)
Comment on attachment 469514 [details] [diff] [review]
patch v1: implements change

could use a test, but r=me on the change itself.
Attachment #469514 - Flags: review?(dietrich) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.

To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: