This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
It should be possible to say: void drawImage(in HTMLImageElement image, in float dx, in float dy, in optional float dw, in float dh); ...so that it means the same as: void drawImage(in HTMLImageElement image, in float dx, in float dy); void drawImage(in HTMLImageElement image, in float dx, in float dy, in float dw, in float dh); Basically, have "optional" means that if the argument is omitted, all subsequent ones must be too, but that if it is included, any subsequent arguments up to the next "optional" must be included. Currently, "optional" can't be omitted on arguments after the first with "optional", so the above isn't possible.
That is in fact what the spec used to allow (with [Optional], a long time ago). I removed it because I deemed it confusing: it looks like you can omit dw but still specify dh. The three overloaded operations make it much clearer, IMO.