* Preload critical CSS
(href)
| 269 | * Preload critical CSS |
| 270 | */ |
| 271 | preloadCSS(href) { |
| 272 | const link = this.createLink({ |
| 273 | rel: 'preload', |
| 274 | href, |
| 275 | as: 'style', |
| 276 | onload: "this.onload=null;this.rel='stylesheet'" |
| 277 | }); |
| 278 | |
| 279 | // Fallback for browsers that don't support preload |
| 280 | setTimeout(() => { |
| 281 | if (link.rel !== 'stylesheet') { |
| 282 | link.rel = 'stylesheet'; |
| 283 | } |
| 284 | }, 100); |
| 285 | } |
| 286 | |
| 287 | /** |
| 288 | * Get all active resource hints |
nothing calls this directly
no test coverage detected