Sha256: c5e257d4f7bcbc4188db8676a34f484326cff1aa1ce94f00bb25fec160137846
Contents?: true
Size: 778 Bytes
Versions: 7
Compression:
Stored size: 778 Bytes
Contents
module Browser; class Event class UI < Event def self.supported? Browser.supports? 'Event.UI' end class Definition < Definition def detail=(value) `#@native.detail = #{value}` end def view=(value) `#@native.view = #{value}` end end if Browser.supports? 'Event.constructor' def self.construct(name, desc) `new UIEvent(#{name}, #{desc})` end elsif Browser.supports? 'Event.create' def self.construct(name, desc) %x{ var event = document.createEvent("UIEvent"); event.initUIEvent(name, desc.bubbles, desc.cancelable, desc.view || window, desc.detail || 0); return event; } end end if supported? alias_native :detail alias_native :view end end; end
Version data entries
7 entries across 7 versions & 3 rubygems