From bc35ce544761ee9fee5b2031b144aecb780305c5 Mon Sep 17 00:00:00 2001 From: Onoshko Dan Date: Fri, 3 Jun 2016 13:45:48 +0700 Subject: [PATCH 1/3] `window` instead `root` --- src/retina.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/retina.js b/src/retina.js index 00f7e9c..24c2311 100644 --- a/src/retina.js +++ b/src/retina.js @@ -58,11 +58,11 @@ Retina.isRetina = function() { var mediaQuery = '(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)'; - if (root.devicePixelRatio > 1) { + if (window.devicePixelRatio > 1) { return true; } - if (root.matchMedia && root.matchMedia(mediaQuery).matches) { + if (window.matchMedia && window.matchMedia(mediaQuery).matches) { return true; } From 86974c174fb6d7047d36a20aab78e7cd50dd98d5 Mon Sep 17 00:00:00 2001 From: Onoshko Dan Date: Fri, 3 Jun 2016 13:53:48 +0700 Subject: [PATCH 2/3] `window` instead `root` --- src/retina.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/retina.js b/src/retina.js index 24c2311..0a71eb1 100644 --- a/src/retina.js +++ b/src/retina.js @@ -35,7 +35,7 @@ Retina.init = function(context) { if (context === null) { - context = root; + context = window; } context.addEventListener('load', function() { // https://github.com/imulus/retinajs/commit/e7930be From d13ed34d79cbdd83068f058e6768307ab21a35e1 Mon Sep 17 00:00:00 2001 From: Onoshko Dan Date: Fri, 3 Jun 2016 13:58:59 +0700 Subject: [PATCH 3/3] `window` instead `root` --- src/retina.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/retina.js b/src/retina.js index 0a71eb1..f73896d 100644 --- a/src/retina.js +++ b/src/retina.js @@ -179,6 +179,6 @@ if (Retina.isRetina()) { - Retina.init(root); + Retina.init(null); } })();