forked from progers/pathseg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README.md now that all tests pass
- Loading branch information
Showing
1 changed file
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
# SVGPathSeg polyfill | ||
|
||
The SVGPathSeg API was difficult to use and has been removed from the SVG spec in favor of a new, awesomer API in the Paths module (https://lists.w3.org/Archives/Public/www-svg/2015Jun/0044.html). This polyfill is intended as a drop-in replacement for existing users of the old SVGPathSeg API. | ||
This is a drop-in replacement for the SVGPathSeg and SVGPathSegList APIs that were removed from SVG2 (https://lists.w3.org/Archives/Public/www-svg/2015Jun/0044.html), including the latest spec changes which were implemented in Firefox 43 and Chrome 46. | ||
|
||
The SVGPathSeg API was difficult to use and has been removed from the SVG spec in favor of a new, awesomer API in the Paths module (https://lists.w3.org/Archives/Public/www-svg/2015Jun/0044.html). All new development should use the SVG Path Data API. There's even a polyfill ([path-data-polyfill.js](https://github.com/jarek-foksa/path-data-polyfill.js)) for browsers that do not yet support the new API. | ||
|
||
Existing code that uses the SVGPathSeg or SVGPathSegList APIs will soon break in browsers (including Chromium 47+, see https://groups.google.com/a/chromium.org/d/msg/blink-dev/EDC3cBg9mCU/OvElJgOWCgAJ) and this polyfill can be used to keep pages working. This polyfill is heavily based on the exact code and tests that were removed in Chromium 47. | ||
|
||
## Implementation status | ||
|
||
This is not yet ready to use. | ||
Now passing all SVGPathSeg tests from the Chromium repository. | ||
|
||
This has been tested in svg-edit and works as expected, including passing all svg-edit tests. | ||
|
||
Naively adding this to svg-edit does make the editor usable, though there are still bugs remaining. | ||
## Using pathseg.js | ||
Just add pathseg.js to your server and drop this in your html or svg files: | ||
``` | ||
<script src="pathseg.js"></script> | ||
``` |