modernizr
Version:
Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
20 lines (19 loc) • 466 B
JavaScript
/*!
{
"name": "Shared Workers",
"property": "sharedworkers",
"caniuse": "sharedworkers",
"tags": ["performance", "workers"],
"builderAliases": ["workers_sharedworkers"],
"notes": [{
"name": "W3C Spec",
"href": "https://www.w3.org/TR/workers/"
}]
}
!*/
/* DOC
Detects support for the `SharedWorker` API from the Web Workers spec.
*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('sharedworkers', 'SharedWorker' in window);
});