Re: Proposal for SVG type constructors

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 UTC