Skip to content
This repository was archived by the owner on Oct 4, 2020. It is now read-only.

Commit df36600

Browse files
committed
Add innerWidth and innerHeight for Window
1 parent 6e06f0c commit df36600

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/DOM/HTML/Window.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,15 @@ exports.location = function (window) {
2020
return window.location;
2121
};
2222
};
23+
24+
exports.innerWidth = function (window) {
25+
return function () {
26+
return window.innerWidth;
27+
};
28+
};
29+
30+
exports.innerHeight = function (window) {
31+
return function () {
32+
return window.innerHeight;
33+
};
34+
};

src/DOM/HTML/Window.purs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ foreign import document :: forall eff. Window -> Eff (dom :: DOM | eff) HTMLDocu
1010
foreign import navigator :: forall eff. Window -> Eff (dom :: DOM | eff) Navigator
1111

1212
foreign import location :: forall eff. Window -> Eff (dom :: DOM | eff) Location
13+
14+
foreign import innerWidth :: forall eff. Window -> Eff (dom :: DOM | eff) Int
15+
16+
foreign import innerHeight :: forall eff. Window -> Eff (dom :: DOM | eff) Int

0 commit comments

Comments
 (0)