ScheduleMicrotaskHandler typedef
- Zone self,
- ZoneDelegate parent,
- Zone zone,
- void f( )
The type of a custom Zone.scheduleMicrotask implementation function.
Receives the Zone that the handler was registered on as self
, a delegate forwarding to the handlers of self
's parent zone as parent
, and the current zone where the error was uncaught as zone
, which will have self
as a parent zone.
The function f
is the function which was passed to Zone.scheduleMicrotask of zone
.
The custom handler can choose to replace the function f
with one that does something before, after or instead of calling f
, and then call parent.scheduleMicrotask(zone, replacement)
. or it can implement its own microtask scheduling queue, which typically still depends on parent.scheduleMicrotask
to as a way to get started.
Implementation
typedef void ScheduleMicrotaskHandler( Zone self, ZoneDelegate parent, Zone zone, void f());
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-async/ScheduleMicrotaskHandler.html