Class: Browser::Window::View

Inherits:
Object
  • Object
show all
Defined in:
opal/browser/window/view.rb

Instance Method Summary collapse

Constructor Details

#initialize(window) ⇒ View

Returns a new instance of View.


4
5
6
7
# File 'opal/browser/window/view.rb', line 4

def initialize(window)
  @window = window
  @native = window.to_n
end

Instance Method Details

#heightObject

Raises:

  • (NotImplementedError)

14
15
16
# File 'opal/browser/window/view.rb', line 14

def height
  `#@native.innerHeight`
end

#widthObject

Raises:

  • (NotImplementedError)

10
11
12
# File 'opal/browser/window/view.rb', line 10

def width
  `#@native.innerWidth`
end