W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2015

Re: [geometry] Dictionary argument for DOMQuad constructor

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Tue, 24 Mar 2015 18:29:59 -0400
Message-ID: <5511E567.7030206@mit.edu>
To: Elliott Sprehn <esprehn@gmail.com>, "public-fx@w3.org" <public-fx@w3.org>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
On 3/24/15 5:13 PM, Elliott Sprehn wrote:
> Is it possible to write it as:
>
> Constructor(optional (DOMPointInit or DOMRectInit) arg1, optional
> DOMPointInit p2, ...)

At the moment, no, because those types in the union are not 
distinguishable so Web IDL can't decide whether the first arg should get 
treated as a DOMPointInit or DOMRectInit.

> and then specify that if the first argument is convertible to a
> DOMRectInit

Any object is "convertible" to a DOMRectInit as it's defined right now.

-Boris
Received on Tuesday, 24 March 2015 22:30:30 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 24 March 2015 22:30:32 UTC