This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://dev.w3.org/fxtf/geometry/#dom-domquad [[ DOMQuad ]] Why is there no DOMQuadInit that can be used for DOMQuad constructor?
I guess we can't support both a DOMRectInit and a DOMQuadInit, as it wouldn't be possible to tell which one is used. Possibly we can have a dictionary type with members for both rect and quad, and have the constructor throw if the object has members for both? dictionary DOMRectOrQuadInit { unrestricted double x; unrestricted double y; unrestricted double width; unrestricted double height; DOMPointInit p1; DOMPointInit p2; DOMPointInit p3; DOMPointInit p4; }; new DOMQuad({}); // all points are 0,0 new DOMQuad({width: 100, height: 100}); // rect new DOMQuad({p2: {x: 100}, p3: {x: 100, y: 100}, p4: {y: 100}}); // quad new DOMQuad({p1: {}, x: 100}); // throws TypeError
https://github.com/w3c/fxtf-drafts/commit/62b9cb9d5be4982d2a9cbf314e3a59efb8a68dd6
Oops, sorry, this is not fixed yet.
https://github.com/w3c/fxtf-drafts/commit/c453c6533c75facc86217fab47076029233909c3