[whatwg] proposal: Add support for masking to canvas
Ian Hickson
ian at hixie.ch
Tue Jan 29 23:28:50 PST 2013
On Wed, 30 Jan 2013, Boris Zbarsky wrote:
> On 1/30/13 12:55 AM, Rik Cabanier wrote:
> > void maskImage(optional MaskOptions options);
> >
> > Why is it optional?
>
> Because http://dev.w3.org/2006/webapi/WebIDL/#idl-operations says (if you
> scroll down a ways):
>
> If the type of an argument is a dictionary type or a union type that
> has a dictionary type as one of its flattened member types, and this
> argument is either the final argument or is followed by an optional
> argument, then the argument MUST be specified as optional. Such
> arguments are always considered to have a default value of an empty
> dictionary, unless otherwise specified.
That's weird. heycam, can you elaborate on this? The addHitRegion() case
in particular never makes sense to be called without a dictionary
containing at least one member. Do we have to allow it?
(The webidl checker doesn't seem to catch this particular bug, by the way.)
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list