W3C home > Mailing lists > Public > public-svg-wg@w3.org > January to March 2009

Re: Proposal for SVG type constructors

From: Cameron McCormack <cam@mcc.id.au>
Date: Mon, 9 Feb 2009 10:12:48 +1100
To: public-svg-wg@w3.org
Message-ID: <20090208231248.GC31370@arc.mcc.id.au>

Erik Dahlström:
> Adding a constructor that takes an Object and then calls some defined
> functions on it might be another solution. Then perhaps we'd need just
> that one constructor.

Not sure what you mean by this.  Do you want to support:

  var plainObject = { x: 123, y: 456 };
  var point = new SVGPoint(plainObject);
  plainObject.x = 124;
  alert(point.x);  // alerts "124"

?  I.e., have the SVGPoint host object wrap the native object and use it
as the storage for the point data?

-- 
Cameron McCormack ≝ http://mcc.id.au/
Received on Sunday, 8 February 2009 23:13:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 8 February 2009 23:13:25 GMT