-
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
beasties/packages/beasties/src/index.ts
Lines 304 to 310 in 97a3512
else if (preloadMode === 'swap-high') { | |
// @see http://filamentgroup.github.io/loadCSS/test/new-high.html | |
link.setAttribute('rel', 'alternate stylesheet preload') | |
link.setAttribute('title', 'styles') | |
link.setAttribute('onload', `this.title='';this.rel='stylesheet'`) | |
noscriptFallback = true | |
} |
https://html.spec.whatwg.org/multipage/semantics.html#attr-link-as
Currently, using swap-high
will output a link tag without an as
attribute. This may result in invalid preloading.
In Firefox, it will explicitly log to the console that preloading is disabled.
IMO preloading does not require alternate
stylesheet
values and title
attributes, rel="preload"
and as="style"
seem sufficient.
danielroe
Metadata
Metadata
Assignees
Labels
No labels