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 @@ -379,6 +379,18 @@ class MiniCssExtractPlugin {
379
379
: '' ,
380
380
'var head = document.getElementsByTagName("head")[0];' ,
381
381
'head.appendChild(linkTag);' ,
382
+ "// old webkit's would claim to have onload, but didn't really support it" ,
383
+ '// https://github.com/kriszyp/xstyle/blob/master/core/load-css.js' ,
384
+ 'var webkitVersion = navigator.userAgent.match(/AppleWebKit\\/(\\d+\\.?\\d*)/);' ,
385
+ 'webkitVersion = webkitVersion && +webkitVersion[1];' ,
386
+ 'if (webkitVersion < 536) {' ,
387
+ Template . indent ( [
388
+ '// http://www.backalleycoder.com/2011/03/20/link-tag-css-stylesheet-load-event/' ,
389
+ 'var img = document.createElement("img");' ,
390
+ 'img.onerror = resolve;' ,
391
+ `img.src = fullhref;` ,
392
+ ] ) ,
393
+ '}' ,
382
394
] ) ,
383
395
'}).then(function() {' ,
384
396
Template . indent ( [ 'installedCssChunks[chunkId] = 0;' ] ) ,
You can’t perform that action at this time.
0 commit comments