Class: Browser::Window

Inherits:
Object
  • Object
show all
Defined in:
lib/opal/jquery/window.rb

Overview

Window instances are Native objects used to wrap native window instances.

Generally, you will want to use the top level Window instance, which wraps window from the main page.

Instance Method Summary collapse

Instance Method Details

#elementElement

Returns this Browser::Window instance wrapped as an Element. Useful for delegating jQuery events, which allows the use of window as target.

Returns:



18
19
20
# File 'lib/opal/jquery/window.rb', line 18

def element
  @element ||= Element.find(`window`)
end

#off(*args, &block) ⇒ Object

See Also:



28
29
30
# File 'lib/opal/jquery/window.rb', line 28

def off(*args, &block)
  element.off(*args, &block)
end

#on(*args, &block) ⇒ Object

See Also:



23
24
25
# File 'lib/opal/jquery/window.rb', line 23

def on(*args, &block)
  element.on(*args, &block)
end

#trigger(*args) ⇒ Object

See Also:



33
34
35
# File 'lib/opal/jquery/window.rb', line 33

def trigger(*args)
  element.trigger(*args)
end