Getting the screen resolution
suggest changewindow.screen is browser-only. screen.width and screen.height are the screen size in CSS pixels, including the area covered by the taskbar or dock. They are not physical device pixels; multiply by window.devicePixelRatio when you need device pixels.
const width = window.screen.width,
height = window.screen.height;
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents