1(function (window) { 2 try { 3 new MouseEvent('test'); 4 return false; // No need to polyfill 5 } catch (e) { 6 // Need to polyfill - fall through 7 } 8 9 // Polyfills DOM4 MouseEvent 10 11 var MouseEvent = function (eventType, params) { 12 params = params || { bubbles: false, cancelable: false }; 13 var mouseEvent = document.createEvent('MouseEvent'); 14 mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); 15 16 return mouseEvent; 17 } 18 19 MouseEvent.prototype = Event.prototype; 20 21 window.MouseEvent = MouseEvent; 22})(window);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.