File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -379,6 +379,18 @@ class MiniCssExtractPlugin {
379379 : '' ,
380380 'var head = document.getElementsByTagName("head")[0];' ,
381381 '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+ '}' ,
382394 ] ) ,
383395 '}).then(function() {' ,
384396 Template . indent ( [ 'installedCssChunks[chunkId] = 0;' ] ) ,
You can’t perform that action at this time.
0 commit comments