W3C home > Mailing lists > Public > www-style@w3.org > March 2015

Re: [geometry] Dictionary argument for DOMQuad constructor

From: Elliott Sprehn <esprehn@gmail.com>
Date: Tue, 24 Mar 2015 14:13:51 -0700
Message-ID: <CAPJYB1hHJ_has5quz8_+7dSCd-Kaupd8wyU1OjFSU-LiT878TA@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style list <www-style@w3.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>
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:14:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:52 UTC