diff --git a/pointer_events_polyfill.js b/pointer_events_polyfill.js index e9d751a..9495e6e 100644 --- a/pointer_events_polyfill.js +++ b/pointer_events_polyfill.js @@ -10,16 +10,8 @@ function PointerEventsPolyfill(options){ selector: '*', mouseEvents: ['click','dblclick','mousedown','mouseup'], usePolyfillIf: function(){ - if(navigator.appName == 'Microsoft Internet Explorer') - { - var agent = navigator.userAgent; - if (agent.match(/MSIE ([0-9]{1,}[\.0-9]{0,})/) != null){ - var version = parseFloat( RegExp.$1 ); - if(version < 11) - return true; - } - } - return false; + var dummyStyle = document.createElement('div').style; + return 'pointerEvents' in dummyStyle; } }; if(options){