Re: renaming SVGPathSegList

On Fri, Oct 21, 2011 at 2:09 PM, Cameron McCormack <cam@mcc.id.au> wrote:

> As part of improving the SVG DOM, I think we should consider renaming
> SVGPathSegList to SVGPath (or perhaps even just Path).  SVGPathSegList is
> unwieldy if we want to add a constructor to the interface so that authors
> can do
>
>  var p = new SVGPath("M100,100 ...");
>
> Does anyone think there would be any compatibility risk with this?
>
>
Don't you mean SVGPathElement?

If you dropped the SVG prefix, all  SVG objects would be prefixed 'SVG'
except Path.  Bad, Bad idea!

var p = new SVGPathElement( string );

or

var list = new SVGPathSegList( string );
var p = new SVGPathElement( list );

or

construct individual segments (using constructors like --->
SVGPathSegCurveToQuadraticAbs() <---!!! )

-- 
Politicians should wear uniforms like Nascar drivers.
Emblazoned with their corporate sponsors.

Received on Friday, 21 October 2011 18:36:07 UTC