Contact emails
fer...@chromium.org, dom...@chromium.org
Spec
https://github.com/whatwg/html/pull/2789
Discussion: https://github.com/whatwg/html/issues/512
Summary
Add a new method self.queueMicrotask(Function callback) to allow direct queueing of a microtask.
Motivation
There are many existing ways to queue asynchronous work on the platform, including setTimeout(,0)/the Edge-only setImmediate(); requestAnimationFrame(); and requestIdleCallback(). However, all of them yield to the browser's event loop.
Web developers often want to perform some work as soon as possible, without yielding, but still "async". This is especially useful for operations which can be completed immediately (e.g. serviced from cache). The web platform's primitive for this is queuing a microtask. Developers and frameworks are already queuing their own microtasks by using Promise.resolve().then(callback) or MutationObservers. This API exposes the microtask-queuing primitive directly.
Risks
Interoperability and Compatibility
Low
Edge: positive signals
Firefox: some support, back in 2016
Safari: no signals
Web developers: Positive, seen on github discussion above and by the many frameworks using hacks to work around this (Angular, Ember, Vue, asap dependents...)
Ergonomics
This is making directly available an action that is currently hackily performed. As such it's an ergonomic win.
Activation
Frameworks and developers can use this immediately as-is.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
Is this feature fully tested by web-platform-tests?
Not yet. PR for tests is
https://github.com/web-platform-tests/wpt/pull/6334
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/5111086432911360
Requesting approval to ship?
Yes
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAozHLkxxLUX9Ojn_ietwiC%3DLDZsRiO9mx-NSBWxN8VGOv6S8A%40mail.gmail.com.
Could you please follow the current I2S template?
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAozHLkxxLUX9Ojn_ietwiC%3DLDZsRiO9mx-NSBWxN8VGOv6S8A%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEib5tZ_0XYttYiVxQ-iFHiY9F3Hm7kNOaye_Oadu0-ZDw%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAozHLkxxLUX9Ojn_ietwiC%3DLDZsRiO9mx-NSBWxN8VGOv6S8A%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEib5tZ_0XYttYiVxQ-iFHiY9F3Hm7kNOaye_Oadu0-ZDw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAozHLnfkpXLczbdxmKO2xA3yu4kkgkq4gkDNWnm8R7YKrdBuA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFpjS_1JTQ5iSJPtpwKc%3D_amutY%2BXQYUqf5kNwGtWSFG8YnyKw%40mail.gmail.com.
Ok, just for the record we (API owners) consider this as withdrawn.
We'll follow up.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAozHLkxxLUX9Ojn_ietwiC%3DLDZsRiO9mx-NSBWxN8VGOv6S8A%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEib5tZ_0XYttYiVxQ-iFHiY9F3Hm7kNOaye_Oadu0-ZDw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAAozHLnfkpXLczbdxmKO2xA3yu4kkgkq4gkDNWnm8R7YKrdBuA%40mail.gmail.com.
--Hayato
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFpjS_1JTQ5iSJPtpwKc%3D_amutY%2BXQYUqf5kNwGtWSFG8YnyKw%40mail.gmail.com.