fix(deps): update dependency event-target-shim to v6
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
event-target-shim | dependencies | major | ^5.0.1 -> ^6.0.0 |
Release Notes
mysticatea/event-target-shim
v6.0.2

Bug Fixes

This version fixed event-target-shim/es5
and event-target-shim/umd
exported files for working well on IE11.
v6.0.1
v6.0.0
This package has been rewritten with TypeScript.

Breaking Changes

API has some breaking changes. See Migration Guide for details.

New Features

Event
class is available
■ Previously, this package had not exported Event
class as prefers using the native Event
class. Since this version, this package exports it.
import { EventTarget, Event } from "event-target-shim";
const target = new EventTarget();
target.dispatchEvent(new Event("foo"));
signal
option on EventTarget.prototype.addEventListener
is available
■ It's a new feature that was added to the standard recently: whatwg/dom#919
import { EventTarget, Event } from "event-target-shim";
import { AbortController } from "abort-controller";
const target = new EventTarget();
const ac = new AbortController();
target.addEventListener("foo", listener, { signal: ac.signal });
// Remove the listener
ac.abort();
■ Customizing error/warning handling
Since this version, if a listener threw an exception, it causes the uncaughtException
event on Node.js or the error
event on window
. Also, if an operation was ignored silently, it prints warnings with console.warn
.
You can customize this behavior.
import { setErrorHandler, setWarningHandler } from "event-target-shim";
setErrorHandler((error) => {
// Do something.
});
setWarningHandler((warning) => {
// Do something.
});
Renovate configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.