W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2011

[whatwg] Proposal for <canvas src> to allow images with structured fallback

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 4 Mar 2011 08:51:15 -0800
Message-ID: <AANLkTi=yrBSJYx=7qn=ebkGS-05YgnvmKxOZ_xjbV+bk@mail.gmail.com>
On Thu, Mar 3, 2011 at 6:29 AM, Anne van Kesteren <annevk at opera.com> wrote:
> On Wed, 02 Mar 2011 19:56:54 +0100, Tab Atkins Jr. <jackalmage at gmail.com>
> wrote:
>> Thoughts on the problem or the proposed solution presented here?
> Why not use <object>? It already works and avoids overloading <canvas> for
> something it was not designed for.

<object> doesn't expose image APIs like the 'complete' event.  Also,
it takes arbitrary content, not just images, so you can't use it to
contain user-supplied urls.  Finally, <object> has bad interactivity
behavior - if you drop SVG into <object>, the SVG will swallow any
clicks, while SVG-in-<img> doesn't.  Overall it just doesn't have
sufficiently similar behavior to <img> to be used as a drop-in

<canvas> doesn't *yet* expose the image APIs, but it wouldn't cause
any conflicts to make it have them.  A canvas without a @src would act
just like an <img> without a @src, which I believe is already
consistent with how <canvas> works.

Received on Friday, 4 March 2011 08:51:15 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:31 UTC