- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 16 Sep 2013 09:42:27 -0700
- To: "Robert O'Callahan" <robert@ocallahan.org>
- Cc: Jet Villegas W3C <w3c@junglecode.net>, Cameron McCormack <heycam@gmail.com>, Boris Zbarsky <bzbarsky@mozilla.com>, Doug Schepers <schepers@w3.org>, "public-pointer-events@w3.org" <public-pointer-events@w3.org>, "public-fx@w3.org" <public-fx@w3.org>, www-style <www-style@w3.org>
On Mon, Sep 16, 2013 at 3:46 AM, Robert O'Callahan <robert@ocallahan.org> wrote: > Making DOMPoint a dictionary, as currently proposed, is a problem since it > means other objects (such as the proposed DOMQuad) can't have DOMPoints as > attributes. I'm assuming the WebIDL restriction that attributes can't be > dictionaries is not easily removed. Yes, this is fine with me. > I think we probably should make DOMPoint a regular interface. For methods > that take DOMPoints as parameters, we can retain the convenient literal > syntax for points by adding a DOMPointLiteral dictionary type and using > union types, e.g. > DOMPoint convertPoint((DOMPoint or DOMPointLiteral) point); You don't even need to do that - as long as their attribute/dict-member names match, a DOMPoint *is* a DOMPointLiteral, so you can just write the function signature as: DOMPoint convertPoint(DOMPointLiteral point) ~TJ
Received on Monday, 16 September 2013 16:43:18 UTC