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



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

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

Instance Method Details

#heightObject



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

def height
  `#@native.innerHeight`
end

#locationObject



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

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

#widthObject



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

def width
  `#@native.innerWidth`
end