Total Complexity | 4 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | module Hyalite::DOM |
||
2 | class Window |
||
3 | include Native |
||
4 | include EventTarget |
||
5 | |||
6 | native_reader :document |
||
7 | |||
8 | def location |
||
9 | Native(`#@native.location`) |
||
10 | end |
||
11 | |||
12 | def width |
||
13 | `#@native.innerWidth` |
||
14 | end |
||
15 | |||
16 | def height |
||
17 | `#@native.innerHeight` |
||
18 | end |
||
19 | |||
20 | def self.singleton |
||
21 | @singleton ||= self.new(`window`) |
||
22 | end |
||
23 | end |
||
24 | end |
||
25 |