File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed
Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -381,6 +381,7 @@ export default class Beasties {
381381 // @see http://filamentgroup.github.io/loadCSS/test/new-high.html
382382 link . setAttribute ( 'rel' , 'alternate stylesheet preload' )
383383 link . setAttribute ( 'title' , 'styles' )
384+ link . setAttribute ( 'as' , 'style' )
384385 link . setAttribute ( 'onload' , `this.title='';this.rel='stylesheet'` )
385386 noscriptFallback = true
386387 }
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ exports[`preload modes > should use "swap-high" preload mode correctly 1`] = `
5656"
5757 <html data-beasties-container >
5858 <head >
59- <style >h1{ color :blue } </style ><link rel = " alternate stylesheet preload" href = " /style.css" title = " styles" onload = " this.title='';this.rel='stylesheet'" ><noscript ><link rel = " stylesheet" href = " /style.css" ></noscript >
59+ <style >h1{ color :blue } </style ><link rel = " alternate stylesheet preload" href = " /style.css" title = " styles" as = " style " onload = " this.title='';this.rel='stylesheet'" ><noscript ><link rel = " stylesheet" href = " /style.css" ></noscript >
6060 </head >
6161 <body >
6262 <h1 >Hello World!</h1 >
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ describe('preload modes', () => {
154154 </html>
155155 ` )
156156 expect ( result ) . toContain ( '<style>h1{color:blue}</style>' )
157- expect ( result ) . toContain ( `<link rel="alternate stylesheet preload" href="/style.css" title="styles" onload="this.title='';this.rel='stylesheet'">` )
157+ expect ( result ) . toContain ( `<link rel="alternate stylesheet preload" href="/style.css" title="styles" as="style" onload="this.title='';this.rel='stylesheet'">` )
158158 expect ( result ) . toContain ( '<noscript><link rel="stylesheet" href="/style.css"></noscript>' )
159159 expect ( result ) . toMatchSnapshot ( )
160160 } )
You can’t perform that action at this time.
0 commit comments