Re: [whatwg/dom] Improving ergonomics of events with Observable (#544)

@othermaciej this is perfectly legal (and seems like it just might work) syntax though:

```js
myDiv.addEventListener('click', async (e) => {
  await loadMyWebsite();
  e.preventDefault();
}, { once: true });
```

I feel that's a way bigger (existing) footgun than `.first()` would be. Though I also agree that if you pass a function to `.first(<fn>)` it should be called sync just like the other observable methods, so that you explicitly have to do `.then(<fn>)` to get into the microtask queue.

-- 
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/544#issuecomment-351997301

Received on Friday, 15 December 2017 12:46:19 UTC