- From: viralipurbey via GitHub <noreply@w3.org>
- Date: Wed, 10 Jun 2026 13:34:25 +0000
- To: public-svg-issues@w3.org
viralipurbey has just created a new issue for https://github.com/w3c/svgwg: == `getPathSegmentAtLength()`: Define behavior for `NaN` distance == The spec states that the distance parameter to `getPathSegmentAtLength()` "shall be clamped to [0, total-length]". However, `NaN` cannot be meaningfully clamped to a numeric range. **Proposed resolution**: Return `null` when distance is `NaN`. This aligns with the graceful-degradation model used elsewhere in SVG (no exceptions for invalid numeric inputs) and is consistent with `unrestricted float` semantics. Firefox currently returns null for NaN. For `±Infinity`, clamping to `[0, total-length]` works as expected (`-Infinity` → first segment, `+Infinity` → last segment). Firefox behaves the same way. https://svgwg.org/svg2-draft/paths.html#DOMInterfaces Please view or discuss this issue at https://github.com/w3c/svgwg/issues/1128 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 10 June 2026 13:34:27 UTC