-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
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.createTimer(zone, replacement). or it can implement its own timer queue, which typically still depends onparent.createTimerto as a way to get started.
Issues:
-
parent.createTimertakes three arguments, not two. -
There's a stray period before "or it can implement".
-
It's not clear why you would call
parent.createTimer(which takes a zone) vsself.createTimer. Indeed it's not really clear why there's three zones in play here. When you callrunZoned, there's only two zones that you really should worry about: yours, and the new one.
Other documentation around the timer logic in zones is anemic at best. ZoneSpecification.createTimer is a single line, and doesn't mention that CreateTimerHandler has useful information. Zone.createTimer is empty documentation (just one line of text that you can guess from the names of the members), and doesn't point to anything useful.