DOMPoint constructor no longer accepts DOMPointInit as argument; DOMQuad.bounds has been deprecated

Published: | Categories: DOM


Firefox 62 has updated the implementation of the DOMPoint and DOMPointReadOnly interfaces to the current Geometry Interfaces Module draft spec.

These constructors will no longer take a DOMPointInit dictionary containing an x coordinate, a y coordinate, a z coordinate and a w perspective, which have to be specified by separate arguments for the constructor. Alternatively, You can use the new DOMPoint.fromPoint and DOMPointReadOnly.fromPoint static methods that accept a DOMPointInit dictionary as the argument.

// Don't do this
let dp = new DOMPoint({ x, y, z, w });

// Do this
let dp = new DOMPoint(x, y, z, w);
// or
let dp = DOMPoint.fromPoint({ x, y, z, w });

The bounds property on the DOMQuad interface is also considered deprecated as per the draft spec. It will be removed in the near future in favour of the getBounds method added with Firefox 62.

Update: The bounds property has been removed with Firefox 69.