Comparing version 1.3.1 to 1.3.2
{ | ||
"name": "crossvent", | ||
"description": "Cross-platform browser event handling", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"homepage": "https://github.com/bevacqua/crossvent", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -0,1 +1,5 @@ | ||
# v1.3.2 Ice Bug | ||
- `e.which` gets normalized across browsers, `e.keyCode` is used if not present | ||
# v1.3.1 Fire Bug | ||
@@ -2,0 +6,0 @@ |
/** | ||
* crossvent - Cross-platform browser event handling | ||
* @version v1.2.0 | ||
* @version v1.3.2 | ||
* @link https://github.com/bevacqua/crossvent | ||
@@ -11,2 +11,3 @@ * @license MIT | ||
var doc = document; | ||
var addEvent = addEventEasy; | ||
@@ -25,4 +26,4 @@ var removeEvent = removeEventEasy; | ||
function addEventHard (el, type, fn, capturing) { | ||
return el.attachEvent('on' + type, wrap(el, type, fn), capturing); | ||
function addEventHard (el, type, fn) { | ||
return el.attachEvent('on' + type, wrap(el, type, fn)); | ||
} | ||
@@ -34,10 +35,16 @@ | ||
function removeEventHard (el, type, fn, capturing) { | ||
return el.detachEvent('on' + type, unwrap(el, type, fn), capturing); | ||
function removeEventHard (el, type, fn) { | ||
return el.detachEvent('on' + type, unwrap(el, type, fn)); | ||
} | ||
function fabricateEvent (el, type) { | ||
var e = document.createEvent('Event'); | ||
e.initEvent(type, true, true); | ||
el.dispatchEvent(e); | ||
var e; | ||
if (doc.createEvent) { | ||
e = doc.createEvent('Event'); | ||
e.initEvent(type, true, true); | ||
el.dispatchEvent(e); | ||
} else if (doc.createEventObject) { | ||
e = doc.createEventObject(); | ||
el.fireEvent('on' + type, e); | ||
} | ||
} | ||
@@ -49,4 +56,5 @@ | ||
e.target = e.target || e.srcElement; | ||
e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; }; | ||
e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; }; | ||
e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; }; | ||
e.which = e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ZENhY2hlW2ldO1xuICAgIGlmIChpdGVtLmVsZW1lbnQgPT09IGVsICYmIGl0ZW0udHlwZSA9PT0gdHlwZSAmJiBpdGVtLmZuID09PSBmbikge1xuICAgICAgcmV0dXJuIGk7XG4gICAgfVxuICB9XG59XG5cbm1vZHVsZS5leHBvcnRzID0ge1xuICBhZGQ6IGFkZEV2ZW50LFxuICByZW1vdmU6IHJlbW92ZUV2ZW50LFxuICBmYWJyaWNhdGU6IGZhYnJpY2F0ZUV2ZW50XG59O1xuXG59KS5jYWxsKHRoaXMsdHlwZW9mIHNlbGYgIT09IFwidW5kZWZpbmVkXCIgPyBzZWxmIDogdHlwZW9mIHdpbmRvdyAhPT0gXCJ1bmRlZmluZWRcIiA/IHdpbmRvdyA6IHt9KSJdfQ== | ||
(1) | ||
}); |
@@ -1,2 +0,2 @@ | ||
// crossvent@v1.2.0, MIT licensed. https://github.com/bevacqua/crossvent | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.crossvent=e()}}(function(){return function e(n,t,r){function o(i,u){if(!t[i]){if(!n[i]){var a="function"==typeof require&&require;if(!u&&a)return a(i,!0);if(f)return f(i,!0);throw new Error("Cannot find module '"+i+"'")}var c=t[i]={exports:{}};n[i][0].call(c.exports,function(e){var t=n[i][1][e];return o(t?t:e)},c,c.exports,e,n,t,r)}return t[i].exports}for(var f="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(e,n){(function(e){"use strict";function t(e,n,t,r){return e.addEventListener(n,t,r)}function r(e,n,t,r){return e.attachEvent("on"+n,a(e,n,t),r)}function o(e,n,t,r){return e.removeEventListener(n,t,r)}function f(e,n,t,r){return e.detachEvent("on"+n,c(e,n,t),r)}function i(e,n){var t=document.createEvent("Event");t.initEvent(n,!0,!0),e.dispatchEvent(t)}function u(n,t,r){return function(t){var o=t||e.event;o.target=o.target||o.srcElement,o.preventDefault=o.preventDefault||function(){o.returnValue=!1},o.stopPropagation=o.stopPropagation||function(){o.cancelBubble=!0},r.call(n,o)}}function a(e,n,t){var r=c(e,n,t)||u(e,n,t);return s.push({wrapper:r,element:e,type:n,fn:t}),r}function c(e,n,t){var r=d(e,n,t);if(r){var o=s[r].wrapper;return s.splice(r,1),o}}function d(e,n,t){var r,o;for(r=0;r<s.length;r++)if(o=s[r],o.element===e&&o.type===n&&o.fn===t)return r}var p=t,l=o,s=[];e.addEventListener||(p=r,l=f),n.exports={add:p,remove:l,fabricate:i}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}); | ||
// crossvent@v1.3.2, MIT licensed. https://github.com/bevacqua/crossvent | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.crossvent=e()}}(function(){return function e(n,t,r){function o(f,u){if(!t[f]){if(!n[f]){var c="function"==typeof require&&require;if(!u&&c)return c(f,!0);if(i)return i(f,!0);throw new Error("Cannot find module '"+f+"'")}var a=t[f]={exports:{}};n[f][0].call(a.exports,function(e){var t=n[f][1][e];return o(t?t:e)},a,a.exports,e,n,t,r)}return t[f].exports}for(var i="function"==typeof require&&require,f=0;f<r.length;f++)o(r[f]);return o}({1:[function(e,n){(function(e){"use strict";function t(e,n,t,r){return e.addEventListener(n,t,r)}function r(e,n,t){return e.attachEvent("on"+n,c(e,n,t))}function o(e,n,t,r){return e.removeEventListener(n,t,r)}function i(e,n,t){return e.detachEvent("on"+n,a(e,n,t))}function f(e,n){var t;p.createEvent?(t=p.createEvent("Event"),t.initEvent(n,!0,!0),e.dispatchEvent(t)):p.createEventObject&&(t=p.createEventObject(),e.fireEvent("on"+n,t))}function u(n,t,r){return function(t){var o=t||e.event;o.target=o.target||o.srcElement,o.preventDefault=o.preventDefault||function(){o.returnValue=!1},o.stopPropagation=o.stopPropagation||function(){o.cancelBubble=!0},o.which=o.which||o.keyCode,r.call(n,o)}}function c(e,n,t){var r=a(e,n,t)||u(e,n,t);return s.push({wrapper:r,element:e,type:n,fn:t}),r}function a(e,n,t){var r=d(e,n,t);if(r){var o=s[r].wrapper;return s.splice(r,1),o}}function d(e,n,t){var r,o;for(r=0;r<s.length;r++)if(o=s[r],o.element===e&&o.type===n&&o.fn===t)return r}var p=document,v=t,l=o,s=[];e.addEventListener||(v=r,l=i),n.exports={add:v,remove:l,fabricate:f}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}); |
{ | ||
"name": "crossvent", | ||
"description": "Cross-platform browser event handling", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"homepage": "https://github.com/bevacqua/crossvent", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -45,4 +45,5 @@ 'use strict'; | ||
e.target = e.target || e.srcElement; | ||
e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; }; | ||
e.preventDefault = e.preventDefault || function preventDefault () { e.returnValue = false; }; | ||
e.stopPropagation = e.stopPropagation || function stopPropagation () { e.cancelBubble = true; }; | ||
e.which = e.which || e.keyCode; | ||
fn.call(el, e); | ||
@@ -49,0 +50,0 @@ }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18744
279