On Wed, 25 Mar 2015 13:55:04 +0100, Domenic Denicola <[email protected]> wrote:
I think a better solution might be a single constructor (no overloads)
plus static factory methods. So something like
[Constructor(optional DOMPointInit p1, ...)]
interface DOMQuad {
...
static fromRect(optional DOMRectInit);
static fromQuad(optional DOMQuadInit);
}
I've started to implement this suggestion in the spec.
https://github.com/w3c/fxtf-drafts/commit/62b9cb9d5be4982d2a9cbf314e3a59efb8a68dd6
DOMMatrix constructor still has overloads, which I intend to convert to
fromX also. It happens to already have toFloat32Array, toFloat64Array, and
toString, so fromFloat32Array, fromFloat64Array and fromString would
neatly mirror those.
--
Simon Pieters
Opera Software