+ 2

document.body.clientHeight and document.body.clientWidth vs window.innerHeight and window.innerWidth

They both return the height and width of the document and can be used to set the canvas to fit the whole screen. Is there a difference between the two and Is there a reason for choosing to use one over the other?

5th Jun 2017, 10:05 PM
Andy
1 Answer