mw.loader: Fix regression that caused CSS load after scripts.
authorTimo Tijhof <ttijhof@wikimedia.org>
Fri, 29 Mar 2013 20:09:06 +0000 (21:09 +0100)
committerCatrope <roan.kattouw@gmail.com>
Mon, 8 Apr 2013 19:23:19 +0000 (12:23 -0700)
commit97c2c66cc167e9fd34bffe8882b91b99aac2102e
treeece1603222c38803afc346286d87b67e4db0e90f
parent902f5779af3169cd61330e02a12435c8fef905f6
mw.loader: Fix regression that caused CSS load after scripts.

Follows-up 705d50c which introduced cssText buffer (yielding
one tick of the event queue to reduce the number of forced
repaints).

However since that made CSS loading asynchronoous (be it only for
a split second) it caused some nasty side-effects.

This was also reflected in the unit tests that had to resort
to doing setTimeout from within the mw.loader implemented script
to assert the styles. This is now sane again: Scripts execute
after styles are inserted.

Bug: 46401
Change-Id: Ib54a3e78710b7f798c6730d3f540d3284001e2de
resources/mediawiki/mediawiki.js
tests/qunit/suites/resources/mediawiki/mediawiki.test.js