Skip to content

Commit 0a5936e

Browse files
committed
window.devicePixelRatio
1 parent 942a412 commit 0a5936e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/Web/HTML/Window.js

+6
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@ exports.scrollY = function (window) {
176176
};
177177
};
178178

179+
exports.devicePixelRatio = function(window) {
180+
return function() {
181+
return window.devicePixelRatio;
182+
};
183+
};
184+
179185
exports.localStorage = function (window) {
180186
return function () {
181187
return window.localStorage;

src/Web/HTML/Window.purs

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module Web.HTML.Window
2525
, scrollBy
2626
, scrollX
2727
, scrollY
28+
, devicePixelRatio
2829
, localStorage
2930
, sessionStorage
3031
, requestAnimationFrame
@@ -114,6 +115,8 @@ foreign import scrollX :: Window -> Effect Int
114115

115116
foreign import scrollY :: Window -> Effect Int
116117

118+
foreign import devicePixelRatio :: Window -> Effect Number
119+
117120
foreign import localStorage :: Window -> Effect Storage
118121

119122
foreign import sessionStorage :: Window -> Effect Storage

0 commit comments

Comments
 (0)