[whatwg] Canvas size and double buffering.

Tim Hutt tdhutt at gmail.com
Wed Feb 3 15:12:21 PST 2010

On 3 February 2010 20:14, Boris Zbarsky <bzbarsky at mit.edu> wrote:
> Yep.  canvas.width = canvas.getBoundingClientRect().width;

Ah yes that works nicely, with one minor caveat: it seems to include
the width of the border if there is one, so you have to take that into
account. You're right, this is a better solution.


More information about the whatwg mailing list