Re: Missing values in SVGPathElement API: What to do?

On 10/24/13 11:06 PM, Dirk Schulze wrote:
> Well, it uses float and not unrestricted float. Therefore NaN values shouldn’t be accepted. Am I wrong?

No, you're right.  If it's using "float" and someone passes in NaN or 
something that coerces to NaN (like undefined), then you'll get an 
exception.  You can see that in a current Gecko:

   document.createElementNS("http://www.w3.org/2000/svg", 
"path").createSVGPathSegCurvetoCubicAbs(undefined, undefined, undefined, 
undefined, undefined, undefined)
   TypeError: Argument 1 of 
SVGPathElement.createSVGPathSegCurvetoCubicAbs is not a finite 
floating-point value.

-Boris

Received on Friday, 25 October 2013 04:07:16 UTC