Getting the available area of the screen
suggest changewindow.screen is browser-only. availWidth and availHeight are the screen size in CSS pixels, excluding OS interface such as the taskbar or dock. They still include space covered by other application windows. availLeft and availTop are non-standard.
const availableArea = {
pos: {
x: window.screen.availLeft,
y: window.screen.availTop
},
size: {
width: window.screen.availWidth,
height: window.screen.availHeight
}
};
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents