Path2D and roundRect Canvas Polyfill

JSON →
library 3.2.1 ·javascript
verified May 27, 2026

path2d-polyfill is a JavaScript library designed to provide comprehensive polyfills for the Canvas API's `Path2D` interface and the `CanvasRenderingContext2D.roundRect` method in environments where they are natively unsupported. Its primary function is to extend the global `window` object, making these modern canvas features available across a wider range of browsers, ensuring consistent rendering. The current stable version is 3.2.1. Releases appear to follow an on-demand cadence, often co-releasing with its internal `path2d` dependency, indicating active maintenance. Key differentiators include comprehensive support for various `Path2D` methods (such as `arc`, `ellipse`, `bezierCurveTo`), and advanced `roundRect` functionality, including support for `DOMPoint` objects or arrays of radii for elliptical and mixed corners, which was introduced in version 3.2.0. This makes it a crucial tool for simplifying canvas development by abstracting away browser inconsistencies for advanced shape drawing.

total hits 18
actors 8 distinct systems
last hit 19h ago AhrefsBot
ChatGPT-User
3
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2
Humans
1

top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany · 🇳🇴 Norway