Class: Browser::Event::Definition
- Includes:
- Native
- Defined in:
- lib/diamonds/opal/browser/event/base.rb
Overview
Direct Known Subclasses
Animation::Definition, AudioProcessing::Definition, Clipboard::Definition, Close::Definition, Custom::Definition, Browser::Event::DeviceLight::Definition, Browser::Event::DeviceMotion::Definition, Browser::Event::DeviceOrientation::Definition, Browser::Event::DeviceProximity::Definition, Browser::Event::Drag::Definition, Gamepad::Definition, HashChange::Definition, Message::Definition, PageTransition::Definition, PopState::Definition, Progress::Definition, Storage::Definition, Touch::Definition, UI::Definition, Wheel::Definition
Class Method Summary collapse
Instance Method Summary collapse
-
#bubbles=(value) ⇒ Object
Set the event as bubbling.
-
#cancelable=(value) ⇒ Object
Set the event as cancelable.
Class Method Details
.new(&block) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/diamonds/opal/browser/event/base.rb', line 11 def self.new(&block) data = super(`{ bubbles: true, cancelable: true }`) block.call(data) if block data.to_n end |
Instance Method Details
#bubbles=(value) ⇒ Object
Set the event as bubbling.
19 20 21 |
# File 'lib/diamonds/opal/browser/event/base.rb', line 19 def bubbles=(value) `#@native.bubbles = #{value}` end |
#cancelable=(value) ⇒ Object
Set the event as cancelable.
24 25 26 |
# File 'lib/diamonds/opal/browser/event/base.rb', line 24 def cancelable=(value) `#@native.cancelable = #{value}` end |