W3C home > Mailing lists > Public > public-fx@w3.org > October to December 2013

[geometry] Cloning DOMPoint, DOMMatrix and DOMRect instances

From: Jarek Foksa <jarek@foksa.name>
Date: Fri, 27 Dec 2013 21:01:36 +0100
Message-Id: <38B128E2-CC4B-43C4-8552-03897F1D1E98@foksa.name>
To: public-fx@w3.org
What will be the preferred way to clone an instance of DOMPoint, DOMMatrix and DOMRect? Will it be possible to pass an instance to a constructor in order to create a clone? For example:

  let initialPosition = new Point(100, 100);
  let currentPosition = new Point(initialPosition);

Even if this will be possible, I think it would more convenient to have a clone() method on geometry interfaces just like there is cloneNode() on DOM Node interface:

  let initialPosition = new Point(100, 100);
  let currentPosition = initialPosition.clone();
Received on Saturday, 28 December 2013 08:28:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:49:48 UTC