- From: Dirk Schulze via GitHub <sysbot+gh@w3.org>
- Date: Sun, 15 Apr 2018 17:47:21 +0000
- To: public-fxtf-archive@w3.org
dirkschulze has just created a new issue for https://github.com/w3c/fxtf-drafts: == [geometry] return DOMPoint or DOMPointReadOnly accordingly, from matrixTransform method? == By Joe Pea on : >https://drafts.fxtf.org/geometry/#ref-for-dom-dompointreadonly-w-1 > >[[ > DOMPoint matrixTransform(optional DOMMatrixInit matrix); >]] > >Why not return DOMPoint or DOMPointReadOnly accordingly? > >For example, when implemented in JavaScript, then instead of > >``` >matrixTransform(matrix) { > let result = new DOMPoint(this) >} >``` > >we would write > >``` >matrixTransform(matrix) { > let result = new this.constructor(this) >} >``` > >so that it picks the right constructor. > Oh, and I am missing the rest of the implementation in those examples, just showing that we can create a new matrix based on which class is being used. from @zcorpan > We could, but why? > >Note that DOMMatrixReadOnly's immutable transformation methods also return DOMMatrix rather >than DOMMatrixReadOnly. Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/275 using your GitHub account
Received on Sunday, 15 April 2018 17:47:27 UTC