- From: Aleksander Heintz <notifications@github.com>
- Date: Fri, 15 Dec 2017 12:45:55 +0000 (UTC)
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 15 December 2017 12:46:19 UTC
@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