W3C home > Mailing lists > Public > www-style@w3.org > September 2013

DOMPoint dictionary problem

From: Robert O'Callahan <robert@ocallahan.org>
Date: Mon, 16 Sep 2013 22:46:29 +1200
Message-ID: <CAOp6jLakF=cbsxK8_S=KMdv2vHD2F53gGbH3+zfdxtbAAixWkg@mail.gmail.com>
To: Jet Villegas W3C <w3c@junglecode.net>, Cameron McCormack <heycam@gmail.com>, Boris Zbarsky <bzbarsky@mozilla.com>
Cc: 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>
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.

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);

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*
Received on Monday, 16 September 2013 10:47:01 UTC

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