off

remove registered handler(s), either every handler for given event, or the one with given id


Parameters

off target :integer :event

Returns

  • :nothing

Examples

copy
E: event 'tick on E [ print "tick!" ] emit E off E emit E ; → no-op; nothing prints

copy
; per-handler removal via the id `on.id` returns: id: on.id E [ print "first" ] on E [ print "second" ] off id ; drops only the "first" handler emit E ; → second

Related