Split the 'mediawiki.legacy.commonPrint' styles into a separate <style>
tag which sets media="print", which will make it a non-render blocking
resource.
Bug: T108413
Change-Id: Ife1d65b31bc79f96d7b89b94fdaeb2babf7ddf40
// Automatically select style/script elements
if ( $only === ResourceLoaderModule::TYPE_STYLES ) {
- $link = Html::linkedStyle( $url );
+ $media = $group === 'print' ? 'print' : 'all';
+ $link = Html::linkedStyle( $url, $media );
} else {
if ( $context->getRaw() || $isRaw ) {
// Startup module can't load itself, needs to use <script> instead of mw.loader.load
'styles' => array(
'resources/src/mediawiki.legacy/commonPrint.css' => array( 'media' => 'print' )
),
+ 'group' => 'print',
),
'mediawiki.legacy.protect' => array(
'scripts' => 'resources/src/mediawiki.legacy/protect.js',