bootstack.events.Subscription#
- class bootstack.events.Subscription(widget, sequence, bind_id)#
Bases:
objectHandle returned by
widget.on(...). Cancels the binding when.cancel()is called or the context manager exits.Idempotent: calling
cancel()more than once is a no-op.- cancel()#
Remove the binding. Safe to call more than once, and on a dead widget.
cancelledafterwards means the removal was carried out as far as this handle can carry it — the handler will not be delivered to again through this subscription.