@testing-library/dom
Advanced tools
Comparing version 6.12.1 to 6.12.2
@@ -1935,3 +1935,21 @@ 'use strict'; | ||
var EventConstructor = window[EventType] || window.Event; | ||
return new EventConstructor(eventName, eventInit); | ||
/* istanbul ignore else */ | ||
if (typeof EventConstructor === 'function') { | ||
return new EventConstructor(eventName, eventInit); | ||
} else { | ||
// IE11 polyfill from https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill | ||
var event = window.document.createEvent(EventType); | ||
var bubbles = eventInit.bubbles, | ||
cancelable = eventInit.cancelable, | ||
detail = eventInit.detail, | ||
otherInit = _objectWithoutPropertiesLoose(eventInit, ["bubbles", "cancelable", "detail"]); | ||
event.initEvent(eventName, bubbles, cancelable, detail); | ||
Object.keys(otherInit).forEach(function (eventKey) { | ||
event[eventKey] = otherInit[eventKey]; | ||
}); | ||
return event; | ||
} | ||
}; | ||
@@ -1938,0 +1956,0 @@ |
@@ -1929,3 +1929,21 @@ import _extends from '@babel/runtime/helpers/esm/extends'; | ||
var EventConstructor = window[EventType] || window.Event; | ||
return new EventConstructor(eventName, eventInit); | ||
/* istanbul ignore else */ | ||
if (typeof EventConstructor === 'function') { | ||
return new EventConstructor(eventName, eventInit); | ||
} else { | ||
// IE11 polyfill from https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill | ||
var event = window.document.createEvent(EventType); | ||
var bubbles = eventInit.bubbles, | ||
cancelable = eventInit.cancelable, | ||
detail = eventInit.detail, | ||
otherInit = _objectWithoutPropertiesLoose(eventInit, ["bubbles", "cancelable", "detail"]); | ||
event.initEvent(eventName, bubbles, cancelable, detail); | ||
Object.keys(otherInit).forEach(function (eventKey) { | ||
event[eventKey] = otherInit[eventKey]; | ||
}); | ||
return event; | ||
} | ||
}; | ||
@@ -1932,0 +1950,0 @@ |
@@ -669,3 +669,21 @@ "use strict"; | ||
const EventConstructor = window[EventType] || window.Event; | ||
return new EventConstructor(eventName, eventInit); | ||
/* istanbul ignore else */ | ||
if (typeof EventConstructor === 'function') { | ||
return new EventConstructor(eventName, eventInit); | ||
} else { | ||
// IE11 polyfill from https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill | ||
const event = window.document.createEvent(EventType); | ||
const { | ||
bubbles, | ||
cancelable, | ||
detail | ||
} = eventInit, | ||
otherInit = (0, _objectWithoutPropertiesLoose2.default)(eventInit, ["bubbles", "cancelable", "detail"]); | ||
event.initEvent(eventName, bubbles, cancelable, detail); | ||
Object.keys(otherInit).forEach(eventKey => { | ||
event[eventKey] = otherInit[eventKey]; | ||
}); | ||
return event; | ||
} | ||
}; | ||
@@ -672,0 +690,0 @@ |
{ | ||
"name": "@testing-library/dom", | ||
"version": "6.12.1", | ||
"version": "6.12.2", | ||
"description": "Simple and complete DOM testing utilities that encourage good testing practices.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -236,2 +236,3 @@ <div align="center"> | ||
<td align="center"><a href="https://www.linkedin.com/in/seetdev/"><img src="https://avatars2.githubusercontent.com/u/35116035?v=4" width="100px;" alt=""/><br /><sub><b>seetdev</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=seetdev" title="Tests">⚠️</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=seetdev" title="Code">💻</a></td> | ||
<td align="center"><a href="https://twitter.com/xgbuils"><img src="https://avatars2.githubusercontent.com/u/6483614?v=4" width="100px;" alt=""/><br /><sub><b>Xavier Garcia Buils</b></sub></a><br /><a href="https://github.com/testing-library/dom-testing-library/commits?author=xgbuils" title="Code">💻</a> <a href="https://github.com/testing-library/dom-testing-library/commits?author=xgbuils" title="Tests">⚠️</a></td> | ||
</tr> | ||
@@ -238,0 +239,0 @@ </table> |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
1681874
15398
294