Created
February 14, 2018 22:35
-
-
Save afiedler/5013ea779bde7103ec70902a75cd471a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var canvas = document.createElement("canvas"); | |
var ctx = canvas.getContext("2d") | |
var devicePixelRatio = window.devicePixelRatio || 1; | |
var backingStoreRatio = ctx.webkitBackingStorePixelRatio || | |
ctx.mozBackingStorePixelRatio || | |
ctx.msBackingStorePixelRatio || | |
ctx.backingStorePixelRatio || 1 | |
console.log("devicePixelRatio: " + devicePixelRatio + "; backingStoreRatio: " + backingStoreRatio); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment