mozilla / tabzilla

Universal Tab for Mozilla websites
Mozilla Public License 2.0
74 stars 46 forks source link

jQuery wouldn't be added if Tabzilla was appended to the DOM after it had loaded #48

Closed mjschranz closed 11 years ago

mjschranz commented 11 years ago

Right now the code that is present to add jQuery to the page if it isn't present will only fire if the Tabzilla script was included already in the DOM when the page is loading. This is because of the reliance on listening for DOMContentLoaded ( or the equivalent for older browsers ).

We don't specifically encounter this problem right now with Popcorn Maker because we only have a single template being used in our system however soon enough it will be moving back to a multiple template system and relying on people to appropriate include scripts wouldn't be fun. On our end we need to move to including Tabzilla as part of the application itself which means including the script after the DOMContentLoaded event has fired.

gauthierm commented 11 years ago

Change looks ok to me.

sgarrity commented 11 years ago

How that tabzilla has been merged into bedrock, I've created a new pull request based on this patch: https://github.com/mozilla/bedrock/pull/545