Events
Static variables
Static methods
staticunobserve():Void
Ensures current autorun
won't be affected by the code after this call.
reobserve()
should be called to restore previous state.
staticreobserve():Void
Resume observing values and resume affecting current autorun
scope.
This should be called after an unobserve()
call.
staticcease():Void
Unbinds and destroys current autorun
. The name cease()
has been chosed there
so that it is unlikely to collide with other more common names suchs as stop
, unbind
etc...
and should make it more recognizable, along with observe()
and unobserve()
.
staticunobserved(func:() ‑> Void):Void
Executes the given function synchronously and ensures the
current autorun
scope won't be affected
Constructor
new(onRun:() ‑> Void, ?afterRun:() ‑> Void)
Initialize a new autorun.
Parameters:
onRun | The callback that will be executed and used to compute implicit bindings |
---|---|
afterRun | (optional) A callback run right after |