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.
18 19 20 |
# File 'lib/opal/jquery/window.rb', line 18 def element @element ||= Element.find(`window`) end |
#off(*args, &block) ⇒ Object
28 29 30 |
# File 'lib/opal/jquery/window.rb', line 28 def off(*args, &block) element.off(*args, &block) end |
#on(*args, &block) ⇒ Object
23 24 25 |
# File 'lib/opal/jquery/window.rb', line 23 def on(*args, &block) element.on(*args, &block) end |
#trigger(*args) ⇒ Object
33 34 35 |
# File 'lib/opal/jquery/window.rb', line 33 def trigger(*args) element.trigger(*args) end |