Class: Hyalite::DOM::Window

Inherits:
Object show all
Includes:
EventTarget, Native
Defined in:
lib/hyalite/dom/window.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from EventTarget

#on

Class Method Details

.singletonObject



24
25
26
# File 'lib/hyalite/dom/window.rb', line 24

def self.singleton
  @singleton ||= self.new(`window`)
end

Instance Method Details

#heightObject



20
21
22
# File 'lib/hyalite/dom/window.rb', line 20

def height
  `#@native.innerHeight`
end

#locationObject



8
9
10
# File 'lib/hyalite/dom/window.rb', line 8

def location
  Native(`#@native.location`)
end

#location=(loc) ⇒ Object



12
13
14
# File 'lib/hyalite/dom/window.rb', line 12

def location=(loc)
  Native(`#@native.location=loc`)
end

#widthObject



16
17
18
# File 'lib/hyalite/dom/window.rb', line 16

def width
  `#@native.innerWidth`
end