event-wait-until
Prevent an event from continuing to propagate up (or down) the down until a Promise has resolved. This is good if you need to do some asynchronous activity before determining if the event should be stopped or prevented.
This is a ponyfill for this WICG issue.
Install
With yarn:
yarn add event-wait-
Example
Here's a simple, and silly, example where we query a Web Worker to determine if the event should be prevented.
anchor;
API
event-wait-until is a function that is placed on the window
object as eventWaitUntil. The signature is eventWaitUntil(event) -> fn(promise)
. See the above example.
License
BSD 2 Clause