Sha256: 83d4cbc4887336f115dbcdc0a04bdab5b2571854bb851ee5a731350dba157e0f
Contents?: true
Size: 461 Bytes
Versions: 4
Compression:
Stored size: 461 Bytes
Contents
module BubbleWrap module UIControlWrapper def when(events, options={}, &block) @callback ||= {} @callback[events] ||= [] unless options[:append] @callback[events] = [] removeTarget(nil, action: nil, forControlEvents: events) end @callback[events] << block block.weak! if BubbleWrap.use_weak_callbacks? addTarget(@callback[events].last, action:'call', forControlEvents: events) end end end
Version data entries
4 entries across 4 versions & 1 rubygems