Page MenuHomePhabricator

TimedMediaHandler should not add start-up scripts
Closed, ResolvedPublic

Description

Without TimedMediaHandler / MWEmbedSupport, the set of modules that loads in <head> (blocking the appearance of content) is limited to the core 'mediawiki' module and jQuery. With TimedMediaHandler / MWEmbedSupport, the modules "mw.MwEmbedSupport", "Spinner", "jquery.loadingSpinner", "jquery.triggerQueueCallback", and "jquery.mwEmbedUtil" are loaded as well.

The only reason I could discover for loading these scripts in <head> is to be able to insert HTML5 element shivs for IE<9.

  • These scripts shouldn't load at all on pages that do not contain timed media.
  • When they do load, they should be loaded in the bottom queue, like ordinary modules.
  • If the HTML5 shiv is necessary, it should be moved to a separate module which contains nothing extraneous and which is loaded only on the pages that need it.

Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=54098
https://bugzilla.wikimedia.org/show_bug.cgi?id=59202
https://phabricator.wikimedia.org/T74675

Details

Reference
bz58085

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:24 AM
bzimport set Reference to bz58085.
TheDJ set Security to None.
TheDJ subscribed.

I have some work in the following patches, but I'm sort of 'stuck' with upstream...
https://gerrit.wikimedia.org/r/#/c/172556/
https://gerrit.wikimedia.org/r/#/c/172421/

TheDJ claimed this task.

Fixed with the mentioned patches, now merged.