modernizr
Version:
Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
17 lines (16 loc) • 424 B
JavaScript
/*!
{
"name": "script[async]",
"property": "scriptasync",
"caniuse": "script-async",
"tags": ["script"],
"builderAliases": ["script_async"],
"authors": ["Theodoor van Donge"]
}
!*/
/* DOC
Detects support for the `async` attribute on the `<script>` element.
*/
define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
Modernizr.addTest('scriptasync', 'async' in createElement('script'));
});