-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async variant #4
Comments
This would work really well for functions that take promises. Eg So instead of: event.respondWith(async function() {
const cachedResponse = await caches.match();
return cachedResponse || fetch(event.request);
}()); Folks could do: event.respondWith(do async {
const cachedResponse = await caches.match();
cachedResponse || fetch(event.request);
}); |
Also there could be
|
Came here inspired by upcoming Rust async blocks. 👍 |
Seems to me it should be |
I think this is a great idea, and I've begun a proposal for this. Feel free to follow along there. |
Brought from a comment to the original proposal Gist by @Jamesernator:
Please note that the discussion went on on the original thread.
The text was updated successfully, but these errors were encountered: