Class: Browser::Window
- Inherits:
-
Object
- Object
- Browser::Window
- Defined in:
- lib/opal/jquery/window.rb
Overview
Instance Method Summary collapse
- #element ⇒ Element
- #off(*args, &block) ⇒ Object
- #on(*args, &block) ⇒ Object
- #trigger(*args) ⇒ Object
Instance Method Details
#element ⇒ Element
Returns this Browser::Window instance wrapped as an Element. Useful for
delegating jQuery events, which allows the use of window as target.
16 17 18 |
# File 'lib/opal/jquery/window.rb', line 16 def element @element ||= Element.find(`window`) end |
#off(*args, &block) ⇒ Object
26 27 28 |
# File 'lib/opal/jquery/window.rb', line 26 def off(*args, &block) element.off(*args, &block) end |
#on(*args, &block) ⇒ Object
21 22 23 |
# File 'lib/opal/jquery/window.rb', line 21 def on(*args, &block) element.on(*args, &block) end |
#trigger(*args) ⇒ Object
31 32 33 |
# File 'lib/opal/jquery/window.rb', line 31 def trigger(*args) element.trigger(*args) end |