File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -365,6 +365,18 @@ class MiniCssExtractPlugin {
365
365
'linkTag.href = fullhref;' ,
366
366
'var head = document.getElementsByTagName("head")[0];' ,
367
367
'head.appendChild(linkTag);' ,
368
+ "// old webkit's would claim to have onload, but didn't really support it" ,
369
+ '// https://github.com/kriszyp/xstyle/blob/master/core/load-css.js' ,
370
+ 'var webkitVersion = navigator.userAgent.match(/AppleWebKit\\/(\\d+\\.?\\d*)/);' ,
371
+ 'webkitVersion = webkitVersion && +webkitVersion[1];' ,
372
+ 'if (webkitVersion < 536) {' ,
373
+ Template . indent ( [
374
+ '// http://www.backalleycoder.com/2011/03/20/link-tag-css-stylesheet-load-event/' ,
375
+ 'var img = document.createElement("img");' ,
376
+ 'img.onerror = resolve;' ,
377
+ `img.src = fullhref;` ,
378
+ ] ) ,
379
+ '}' ,
368
380
] ) ,
369
381
'}).then(function() {' ,
370
382
Template . indent ( [ 'installedCssChunks[chunkId] = 0;' ] ) ,
You can’t perform that action at this time.
0 commit comments