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

[cssom-view] Ability to replace points of a DOMQuad

From: Simon Pieters <simonp@opera.com>
Date: Thu, 26 Sep 2013 15:46:01 +0200
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <op.w30tuzheidj3kv@simons-macbook-pro.local>
The interface for DOMQuad currently in CSSOM View is:

[Constructor(DOMPointLiteral p1, DOMPointLiteral p2, DOMPointLiteral p3,  
DOMPointLiteral p4),
  Constructor(DOMRectAny rect)]
interface DOMQuad {
   [SameObject] readonly attribute DOMPoint p1;
   [SameObject] readonly attribute DOMPoint p2;
   [SameObject] readonly attribute DOMPoint p3;
   [SameObject] readonly attribute DOMPoint p4;
   [SameObject] readonly attribute DOMRectImmutable bounds;
};

http://dev.w3.org/csswg/cssom-view/#the-domquad-interface

The points can be modified by setting their attributes, e.g.:

quad.p1.x = 10;
quad.p1.y = 20;

Do we want to allow the following?

quad.p1 = {x:10, y:20};
quad.p1 = new DOMPoint(10, 20);

If so, what should they do?

(a) The old DOMPoint object is mutated with the values of the new object.
(b) A new DOMPoint object is created with the values of the new object and  
replaces the old DOMPoint object.
(c) The new object replaces the old object, except if it is a  
DOMPointLiteral which acts like (b).
(d) ???

-- 
Simon Pieters
Opera Software
Received on Thursday, 26 September 2013 13:46:32 UTC

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