Why would it be a bad idea? How else would you handle resizing except by handling the window's resize event and reading the innerWidth/innerHeight properties. The real question is what to do with them; I have games where the canvas covers the entire browser window, and games where I sort of choose a good size to leave room for controls around the edges. But that depends on what you're trying to do.