Re: [svg2] Empty path data + getPointAtLenght / getPathSegAtLength

> SVGPathElement.getPointAtLength[1] and getPathSegAtLength[2]

> 1a) gPAL should return SVGPoint(NaN, NaN)
> 1b) gPAL should throw INVALID_ACCESS_ERR (or NOT_SUPPORTED_ERR)
> 1c) gPAL should return SVGPoint(0,0)

> 2a) gPSAL shoud throw INVALID_ACCESS_ERR (or NOT_SUPPORTED_ERR)
> 2b) gPSAL should return 0
> 2c) gPSAL should return undefined
> 2d) gPSAL should return MAX_LONG


I'd suggest that getPointAtLength should throw NOT_FOUND_ERR but I guess
return SVGPoint(0, 0) would be OK if the consensus is not to throw.

NOT_FOUND_ERR says it's for this... If an attempt is made to reference a
node in a context where it does not exist

NOT_FOUND_ERR seems best for 2 also. I don't think undefined would be
allowed by webidl, 0 is misleading. I guess MAX_LONG would be my nothrow
alternative.

Robert.

Received on Sunday, 29 June 2014 10:00:06 UTC