Is DOMMatrix going to be a class we can instantiate?


For example, when DOMMatrix is out, can we do

let matrix = new DOMMatrix(...)

or can we only get DOMMatrix instances in some limited way?


According to MDN, it is supported since Firefox 33, so why not just try and experiment? :wink:


Good point. Indeed, DOMMatrix yes, but not DOMMatrixReadOnly. I’m guessing that the “ReadOnly” in DOMMatrixReadOnly means that we can only get those instances in certain ways (f.e. reading from an Element) but that we can never instantiate them manually?


Per spec DOMMatrixReadOnly also has a constructor. It’s just that Firefox implements an earlier revision of the spec that didn’t have a constructor for DOMMatrixReadOnliy.