Testing PixelStat
Make new PixelStat
for viewport properties
Call watchWindow([element])
have it always updating
[if you send in a dom element it will receive classes]
import PixelStat from './PixelStat.js'; const div = document.querySelector('#Show'); const lib = new PixelStat(); div.innerHTML += `<code><pre>${lib.toString()}</pre></code>`; console.log(lib); lib.watchWindow(div);
CLASS VALUE
max: 1440
min: 718
pxRatio: 1
whRatio: 2.00557
cssArea: 1.03392
devArea: 1.03392
clientSize: 1440,718
innerSize: 1440,718
screenSize: 1440,718
classMega: mega1
classRes: lores
classSize: average
classShape: landscape