2022 Developer Survey is open! Take survey.
6 events
when toggle format what by license comment
Nov 27, 2021 at 1:21 history edited HankMoody CC BY-SA 4.0
added 95 characters in body
Nov 27, 2021 at 1:04 history edited HankMoody CC BY-SA 4.0
added 221 characters in body
Nov 26, 2021 at 21:19 comment added Fabien Auréjac Thank you, as I said in my comment edit, window.outerWidth/window.innerWidth is more accurate on my screen, I will look further if it works everywhere.
Nov 26, 2021 at 21:16 comment added HankMoody Both retina and high DPI displays are represented by the same variable, ie. devicePixelRatio. On such screens devicePixelRatio will be greater than 1.
Nov 26, 2021 at 21:13 comment added Fabien Auréjac Thank you hankMoody for your tips, but in my question I also mention the fact I need solution for "retina" and high dpi displays, do you know if it's possible to detect it ? because here on a 4k screen I get a 0.6 ratio for a 30% zoom. Edit: It seems that window.outerWidth/window.innerWidth does the trick.
Nov 26, 2021 at 19:53 history answered HankMoody CC BY-SA 4.0