- From: Maciej Stachowiak <notifications@github.com>
- Date: Thu, 14 Dec 2017 16:35:19 +0000 (UTC)
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 14 December 2017 16:35:54 UTC
Besides dispatching custom events by hand, I'm pretty sure there are Web Platform APIs that will synchronously dispatch an event from a method called from JavaScript. For example element.click() or element.focus(). In this case, the micro task queue won't be drained until after returning to the outer level, so `preventDefault()` and `stop[Immediate]Propagation()` won't work properly. In addition, timing may be weird, if an event listener was counting on happening before the default action is performed. For example, if you click() a forms submit button, your Promises won't get to run before the form is submitted so they can't last-minute update form fields. -- 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-351764074
Received on Thursday, 14 December 2017 16:35:54 UTC