W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2012

Re: [whatwg] Canvas: dash list API

From: Cameron McCormack <cam@mcc.id.au>
Date: Sun, 23 Dec 2012 00:12:38 +1100
Message-ID: <50D5B1C6.1060606@mcc.id.au>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: WHATWG <whatwg@whatwg.org>
On 22/12/12 10:06 PM, Anne van Kesteren wrote:
> Is there not some way we can have a lineDash attribute that returns a
> manipulatable object that inherits from Array rather than the current
> Java-like API? I remember this was discussed when getLineDash() and
> setLineDash() were added, but I think it's worth taking another look
> at this.
> (For URLs I want something similar for path segments and I'd rather
> not introduce get/set methods.)

Does it need to inherit from Array?  I think we can do this as long as 
the canvas context object does not need to "watch" the Array object for 
changes.  (This is technically already possible by just using "object" 
as the type, and handling assignments of non-Array objects in the 
attribute definition.)

We could have an Array type in Web IDL, which just means "a reference to 
an Array object" and which also doesn't do any type coercion when 
assigning to array elements or anything.
Received on Saturday, 22 December 2012 13:13:15 UTC

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