W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2008

[whatwg] drawImage with non-existent images

From: Jeff Walden <jwalden+whatwg@MIT.EDU>
Date: Sun, 17 Feb 2008 21:24:45 -0500
Message-ID: <47B8EC6D.5070907@mit.edu>
<http://www.whatwg.org/specs/web-apps/current-work/multipage/section-the-canvas.html#drawimage>:

> If the image argument is an HTMLImageElement object whose complete attribute is false, then the implementation must raise an INVALID_STATE_ERR exception.

This is all well and good in the case where the image being drawn has the same origin as the document where the canvas resides, but if the two have different origins, this makes it possible to determine the existence of an image on a foreign server.  This exception must only be thrown if the image element's origin is the same as that of the document containing the canvas being modified.

(You can already determine image existence by seeing how an image affects page layout, but this still seems like a reasonable behavior anyway.)

Jeff
Received on Sunday, 17 February 2008 18:24:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:39 UTC