This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: http://dev.w3.org/html5/2dcontext/ Multipage: http://www.whatwg.org/C#top Complete: http://www.whatwg.org/c#top Comment: Hi Ian, I've some comments about the recent added line dashes. Right now, the mozilla and webkit implements this as an attribute, but in this version, it uses setLineDash() and getLineDash(). These setter/getter are not consistent with the other line styles, such as lineWidth. (There's no such functions called setLineWidth() and getLineWidth()). What's the reason behind this API design? Thanks! guanqun.lu@intel.com Posted from: 134.134.139.76 User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0
There's not really a good way to make array-based attributes work. I'll post a more detailed comment in response to the WHATWG e-mail Mozilla sent suggesting the methods (they intend to remove the attributes).
Basically, the reason is that there's no way to make it work with an attribute: context.lineDash = [1,2,3]; context.lineDash[0] = 2; // what should happen? var a = [1,2,3]; context.lineDash = a; a[0] = 2; // what should happen to context.lineDash? If you look at the feedback Mozilla sent the WHATWG list you'll see they had the same concern with their implementation. (I'm marking the bug resolved since this was just a question, not feedback. Feel free to e-mail the WHATWG list or me directly or indeed to chat on the #whatwg IRC channel on Freenode if you have any questions.)
Thanks for your explanation, Ian.