Skip to content

v5.0.0

Compare
Choose a tag to compare
@fregante fregante released this 31 Aug 03:22
· 21 commits to main since this release

Breaking changes

Migration

Listener removal

v3 (old)

const delegation = delegate(document, 'a', 'click', console.log);
delegation.destroy();

v4 (old)

const controller = delegate(document, 'a', 'click', console.log);
controller.abort();

v5 (new)

This was already possible in v4, so if you were using this pattern, you don't need to change anything.

const controller = new AbortController();
delegate(document, 'a', 'click', console.log, {signal: controller.signal});
controller.abort();

v4.0.1...v5.0.0