Re: [geometry] Dictionary argument for DOMQuad constructor

On Tue, Mar 24, 2015 at 1:55 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> ...
>
> Of course if you're doing that, you could just write it as:
>
>   Constructor(optional DOMPointOrRectOrQuadInit arg1,
>               optional DOMPointInit p2,
>               optional DOMPointInit p3, optional DOMPointInit p4)
>
> and then the prose would see which members of arg1 are present and if so
> decide whether to throw or look at p2-p4 or what.
>
>
>
Is it possible to write it as:

Constructor(optional (DOMPointInit or DOMRectInit) arg1, optional
DOMPointInit p2, ...)

and then specify that if the first argument is convertible to a DOMRectInit
and p2 or any other argument is defined to throw?

- E

Received on Tuesday, 24 March 2015 21:15:02 UTC