Window width:
Window height:
You can use the resize event to be notified when the window is resized.
window.addEventListener("resize", notifyWhenResize);