modernizr
Version:
Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
19 lines (18 loc) • 557 B
JavaScript
/*!
{
"name": "Pointer Lock API",
"property": "pointerlock",
"notes": [{
"name": "MDN Docs",
"href": "https://developer.mozilla.org/en-US/docs/API/Pointer_Lock_API"
}],
"builderAliases": ["pointerlock_api"]
}
!*/
/* DOC
Detects support the pointer lock API which allows you to lock the mouse cursor to the browser window.
*/
define(['Modernizr', 'prefixed'], function(Modernizr, prefixed) {
// https://developer.mozilla.org/en-US/docs/API/Pointer_Lock_API
Modernizr.addTest('pointerlock', !!prefixed('exitPointerLock', document));
});