All notable changes to @jjwesterkamp/event-delegation
will be documented in this file. The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
- Added proper path mappings in
package.json#exports
for./lib
folder.
2.0.6 (2021-04-28)
- Improved UMD bundle size.
- Added default UMD file pointers for CDN services to package.json.
- Added
"exports"
field to package.json.
- Removed ES2015 syntax from UMD bundles. Bundles are now compatible with ES5 environments.
2.0.5 (2021-04-15)
-
Removed UMD namespace declaration from d.ts file, as it was incorrect.
event-delegation.d.ts
- export as namespace EventDelegation
This was incorrectly assuming the following global shape:
const EventDelegation = { default: { // < this is wrong global() { ... }, within() { ... }, withinMany() { ... }, } }
When taking the UMD bundle from an npm installation you can still declare the types manually in a declaration file like this:
import { AskRoot } from '@jjwesterkamp/event-delegation' declare global { const EventDelegation: AskRoot }
2.0.4 (2021-04-12)
- Allow
boolean
type for listenerOptions.
- Updated documentation, fixed some broken links in README.
2.0.3 (2021-04-11)
-
Cleaned up the types strategy
event-delegation.d.ts
is now no longer generated from source files, making the package more lightweight because type declarations are not duplicated anymore. -
Bundled
lib/isFunction
,lib/isString
andlib/isNil
together in one filelib/assertions
.
2.0.2 (2021-04-11)
- Removed sourcemaps from CommonJS and ESM builds in npm releases.
- Removed remaining unnecessary files from npm releases
2.0.1 (2021-04-11)
- Removed documentation folder from npm releases.
2.0.0 (2021-04-11)
No notable changes.
2.0.0-beta1 (2021-04-11)
-
Added type inference for
event.currentTarget
This is technically a breaking change because this feature required the types
DelegationListener
andDelegationEvent
to take an additional type argument for the root element type. However, if you never imported and used these types explicitly this change should not affect you.
- Method
EventDelegation.withinMany()
to explicitly create multiple listeners at once.
1.0.0 (2021-04-10)
- Completely rebuilt the package with a better API and improved type inference.
0.4.4 (2019-06-08)
- Renamed interface
DelegationListener
toEventHandler
- Event type parameter to
DelegationListenerFn
type constructor
0.4.3 (2019-06-05)
- Import polyfill in
closestWithin
module
0.4.2 (2019-02-08)
- No notable changes.
0.4.1 (2019-02-08)
- Added proper polyfill for
Element.prototype.matches()
0.4.0 (2018-11-02)
- Added test suite
- Refactoring of internal code
0.3.0 (2018-11-02)
- Type parameters for annotating the expected type of delegator elements.
0.2.1 (2018-11-02)
- CDN snippet to README
- UMD bundle namespace
0.2.0 (2018-10-27)
- Added
delegator
property to events as an alternative to explicit this-binding
0.1.2 (2018-10-18)
- Implemented application of
listenerOptions
configuration - README changes
0.1.1 (2018-10-17)
- npm ignore fix
- add npm version to README.md
0.1.0 (2018-10-17, Initial release)
- Initial version