Breaking changes
Move base
to options (#46) 247ac87
- delegate(document, 'a', 'click', alert)
+ delegate('a', 'click', alert)
- delegate(myBaseElement, 'a', 'click', alert)
+ delegate('a', 'click', alert, {base: myBaseElement})
Drop support for boolean-only options (#44) 7b3dc8a
- delegate(document, 'a', 'click', alert, true)
+ delegate('a', 'click', alert, {capture: true})
Drop support for selectors and arrays as base
(#45) 5b5138b
- delegate('.my-base-element', 'a', 'click', alert)
- delegate(document.querySelectorAll('.my-base-element'), 'a', 'click', alert)
New
Add promised oneEvent
listener (#41) 5697313
+ await oneEvent('a', 'click')
+ console.log('link was clicked')
Add support for once
(#40) 39dcce7
+ delegate('a', 'click', alert, {once: true})
v5.0.0...v6.0.0