@@ -1090,7 +1090,7 @@ ${await utils.readFile(path.join(__dirname, '../js/multipage.js'))}
1090
1090
script . setAttribute ( 'defer' , '' ) ;
1091
1091
this . doc . head . appendChild ( script ) ;
1092
1092
1093
- this . addStyle ( this . doc . head , path . relative ( outDir , printStyleLocationOnDisk ) , true ) ;
1093
+ this . addStyle ( this . doc . head , path . relative ( outDir , printStyleLocationOnDisk ) , 'print' ) ;
1094
1094
this . addStyle ( this . doc . head , path . relative ( outDir , styleLocationOnDisk ) ) ;
1095
1095
} else {
1096
1096
// i.e. assets.type === 'inline'
@@ -1115,12 +1115,12 @@ ${await utils.readFile(path.join(__dirname, '../js/multipage.js'))}
1115
1115
) ;
1116
1116
}
1117
1117
1118
- private addStyle ( head : HTMLHeadElement , href : string , print : boolean = false ) {
1118
+ private addStyle ( head : HTMLHeadElement , href : string , media ?: 'all' | 'print' | 'screen' ) {
1119
1119
const style = this . doc . createElement ( 'link' ) ;
1120
1120
style . setAttribute ( 'rel' , 'stylesheet' ) ;
1121
1121
style . setAttribute ( 'href' , href ) ;
1122
- if ( print ) {
1123
- style . setAttribute ( 'media' , 'print' ) ;
1122
+ if ( media != null ) {
1123
+ style . setAttribute ( 'media' , media ) ;
1124
1124
}
1125
1125
1126
1126
// insert early so that the document's own stylesheets can override
0 commit comments