I know it's not supported natively, but are there any JS Shims that render into a canvas object or something that would allow me to render SVG on the native android browser? (Not Opera, etc since I'd like to avoid having the user need to install another browser)
Asked
Active
Viewed 2,979 times
7
-
1[Fabric.js](https://github.com/kangax/fabric.js/) supports rendering SVG on canvas. Take a look at a [demo that does exactly that](http://kangax.github.com/fabric.js/svg_rendering/) (careful, loads slowly due to large number of SVG shapes). – kangax Nov 14 '11 at 21:43
1 Answers
6
I think what you want is this library:
http://code.google.com/p/canvg/
Basically, you would detect if the browser is capable of rendering svgs, and if it can't, you would render the SVG to canvas.
-
5Please don't do browser/platform sniffing. Detect if the browser is capable of rendering SVG instead, see e.g http://modernizr.com. – Erik Dahlström Nov 15 '11 at 07:56