modernizr
Version:
Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
31 lines (30 loc) • 944 B
JavaScript
/*!
{
"name": "CSS Pointer Events",
"caniuse": "pointer-events",
"property": "csspointerevents",
"authors": ["ausi"],
"tags": ["css"],
"builderAliases": ["css_pointerevents"],
"notes": [{
"name": "MDN Docs",
"href": "https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events"
}, {
"name": "Test Project Page",
"href": "https://ausi.github.com/Feature-detection-technique-for-pointer-events/"
}, {
"name": "Test Project Wiki",
"href": "https://github.com/ausi/Feature-detection-technique-for-pointer-events/wiki"
}, {
"name": "Related Github Issue",
"href": "https://github.com/Modernizr/Modernizr/issues/80"
}]
}
!*/
define(['Modernizr', 'createElement'], function(Modernizr, createElement) {
Modernizr.addTest('csspointerevents', function() {
var style = createElement('a').style;
style.cssText = 'pointer-events:auto';
return style.pointerEvents === 'auto';
});
});