return $.when.apply( $, all );
} );
loading.then( function () {
- /* global mwPerformance */
- mwPerformance.mark( 'mwLoadEnd' );
+ if ( window.performance && performance.mark ) {
+ performance.mark( 'mwLoadEnd' );
+ }
mw.hook( 'resourceloader.loadEnd' ).fire();
} );
} );
* - Beware: Do not call mwNow before the isCompatible() check.
*/
-/* global mw, mwPerformance, mwNow, isCompatible, $VARS, $CODE */
+/* global mw, mwNow, isCompatible, $VARS, $CODE */
-window.mwPerformance = ( window.performance && performance.mark ) ? performance : {
- mark: function () {}
-};
// Define now() here to ensure valid comparison with mediaWikiLoadEnd (T153819).
window.mwNow = ( function () {
var perf = window.performance,
}
window.mediaWikiLoadStart = mwNow();
- mwPerformance.mark( 'mwLoadStart' );
-
+ if ( window.performance && performance.mark ) {
+ performance.mark( 'mwStartup' );
+ }
script = document.createElement( 'script' );
script.src = $VARS.baseModulesUri;
script.onload = function () {