mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
Prevent flickering of text on load by adding defer="true" to deferred style sheets
This commit is contained in:
parent
00f1a20177
commit
07e46e472e
1 changed files with 1 additions and 0 deletions
|
@ -137,6 +137,7 @@ class PairDrop {
|
||||||
let stylesheet = document.createElement('link');
|
let stylesheet = document.createElement('link');
|
||||||
stylesheet.rel = 'preload';
|
stylesheet.rel = 'preload';
|
||||||
stylesheet.as = 'style';
|
stylesheet.as = 'style';
|
||||||
|
stylesheet.defer = true;
|
||||||
stylesheet.href = url;
|
stylesheet.href = url;
|
||||||
stylesheet.onload = _ => {
|
stylesheet.onload = _ => {
|
||||||
stylesheet.onload = null;
|
stylesheet.onload = null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue