- From: Isiah Meadows <notifications@github.com>
- Date: Wed, 01 Feb 2017 22:38:14 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 2 February 2017 06:38:47 UTC
What makes that any different than what you can do already? It's fairly easy to pull into a utility function.
```js
function on(elem, type) {
return new Promise(resolve => {
elem.addEventListener(type, function listener(ev) {
this.removeEventListener(type, listener, false)
resolve(ev)
}, false)
})
}
```
And given the new `once` option, I seriously doubt such a thing is worth it.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/333#issuecomment-276880484
Received on Thursday, 2 February 2017 06:38:47 UTC