Last active
March 22, 2020 12:54
-
-
Save adamduncan/811dd14e253138ba057e3c26921eba46 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
/*! loadJS: load a JS file asynchronously. [c]2014 @scottjehl, Filament Group, Inc. (Based on http://goo.gl/REQGQ by Paul Irish). Licensed MIT */ | |
!function(e){var t=function(t,o,n){"use strict";var r,a=e.document.getElementsByTagName("script")[0],c=e.document.createElement("script");return"boolean"==typeof o&&(r=n,n=o,o=r),c.src=t,c.async=!n,a.parentNode.insertBefore(c,a),o&&"function"==typeof o&&(c.onload=o),c};"undefined"!=typeof module?module.exports=t:e.loadJS=t}("undefined"!=typeof global?global:this); | |
// Polyfill custom properties for <= IE11 | |
if (!window.CSS || !window.CSS.supports || !window.CSS.supports('--a', 0)) { | |
loadJS('https://unpkg.com/css-vars-ponyfill@2/dist/css-vars-ponyfill.min.js', function() { | |
cssVars(); | |
}) | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Safari gives false positives here, so if you're just looking to polyfill IE, add
documentMode
: