@@ -1090,7 +1090,7 @@ ${await utils.readFile(path.join(__dirname, '../js/multipage.js'))}
10901090 script . setAttribute ( 'defer' , '' ) ;
10911091 this . doc . head . appendChild ( script ) ;
10921092
1093- this . addStyle ( this . doc . head , path . relative ( outDir , printStyleLocationOnDisk ) , true ) ;
1093+ this . addStyle ( this . doc . head , path . relative ( outDir , printStyleLocationOnDisk ) , 'print' ) ;
10941094 this . addStyle ( this . doc . head , path . relative ( outDir , styleLocationOnDisk ) ) ;
10951095 } else {
10961096 // i.e. assets.type === 'inline'
@@ -1115,12 +1115,12 @@ ${await utils.readFile(path.join(__dirname, '../js/multipage.js'))}
11151115 ) ;
11161116 }
11171117
1118- private addStyle ( head : HTMLHeadElement , href : string , print : boolean = false ) {
1118+ private addStyle ( head : HTMLHeadElement , href : string , media ?: 'all' | 'print' | 'screen' ) {
11191119 const style = this . doc . createElement ( 'link' ) ;
11201120 style . setAttribute ( 'rel' , 'stylesheet' ) ;
11211121 style . setAttribute ( 'href' , href ) ;
1122- if ( print ) {
1123- style . setAttribute ( 'media' , 'print' ) ;
1122+ if ( media != null ) {
1123+ style . setAttribute ( 'media' , media ) ;
11241124 }
11251125
11261126 // insert early so that the document's own stylesheets can override
0 commit comments