File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,12 @@ exports.scrollY = function (window) {
176
176
} ;
177
177
} ;
178
178
179
+ exports . devicePixelRatio = function ( window ) {
180
+ return function ( ) {
181
+ return window . devicePixelRatio ;
182
+ } ;
183
+ } ;
184
+
179
185
exports . localStorage = function ( window ) {
180
186
return function ( ) {
181
187
return window . localStorage ;
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ module Web.HTML.Window
25
25
, scrollBy
26
26
, scrollX
27
27
, scrollY
28
+ , devicePixelRatio
28
29
, localStorage
29
30
, sessionStorage
30
31
, requestAnimationFrame
@@ -40,6 +41,7 @@ module Web.HTML.Window
40
41
import Data.Maybe (Maybe )
41
42
import Data.Nullable (Nullable , toMaybe )
42
43
import Effect (Effect )
44
+ import Effect.Uncurried (EffectFn1 , runEffectFn1 )
43
45
import Prelude (class Eq , class Ord , Unit , (<$>))
44
46
import Unsafe.Coerce (unsafeCoerce )
45
47
import Web.Event.EventTarget (EventTarget )
@@ -114,6 +116,8 @@ foreign import scrollX :: Window -> Effect Int
114
116
115
117
foreign import scrollY :: Window -> Effect Int
116
118
119
+ foreign import devicePixelRatio :: Window -> Effect Number
120
+
117
121
foreign import localStorage :: Window -> Effect Storage
118
122
119
123
foreign import sessionStorage :: Window -> Effect Storage
You can’t perform that action at this time.
0 commit comments