Closed Bug 1145172 Opened 10 years ago Closed 10 years ago

Provide a light-weight deferred loader for Tabzilla

Categories

(Websites :: Tabzilla, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: pmac, Unassigned)

References

Details

Similar to what peterbe has done here: https://github.com/peterbe/airmozilla/commit/6ac9b64537a9fd00e72d6e850c6b55b98d1ce425 My only hesitation with that approach is that it requires jQuery. Perhaps there's a reliable native JS technique to accomplish the same thing? The main Tabzilla JS also requires jQuery, but it will load it if it's not already there. We're probably fine with the assumption, and since this is separate we can document that it's a requirement. But if there is something better and lighter perhaps we should use it instead. Thanks Peter!
Thoughts Alex?
Flags: needinfo?(agibson)
It doesn't have to require jQuery. The reason I put mine after a document onload was to delay it even further.
Seems like a good approach to me. We could probably even just use the window onload event and not have it need jQuery.
Flags: needinfo?(agibson)
See Also: → 727914
(In reply to Alex Gibson [:agibson] from comment #3) > Seems like a good approach to me. We could probably even just use the window > onload event and not have it need jQuery. I doubt it because that might cause conflicting with whatever frameworks you might have on the site. I.e. if you do:: window.onload = function() { tabzillaloading }; Then we might hijack the event handler that jQuery's `$(document).ready` might depend on. Perhaps not with modern versions of jQuery but some other sites might rely on `window.onload` and then we'd ruin it possibly.
(In reply to Peter Bengtsson [:peterbe] from comment #4) > (In reply to Alex Gibson [:agibson] from comment #3) > > Seems like a good approach to me. We could probably even just use the window > > onload event and not have it need jQuery. > > I doubt it because that might cause conflicting with whatever frameworks you > might have on the site. I.e. if you do:: > > window.onload = function() { tabzillaloading }; > > Then we might hijack the event handler that jQuery's `$(document).ready` > might depend on. Perhaps not with modern versions of jQuery but some other > sites might rely on `window.onload` and then we'd ruin it possibly. Doh, of course - sorry I forget the overriding. document ready would certainly be preferable.
As you might know, Bug 1151579 has replaced Tabzilla with a static Mozilla tab. The old assets are still available, but no site is probably using it. Closing all Tabzilla-related open bugs at this moment.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.