diff options
author | wout <wout@impinc.co.uk> | 2013-02-15 15:58:40 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-02-15 15:58:40 +0100 |
commit | 5020240e4029a61a9620f21d7be4d9764e7723d1 (patch) | |
tree | 950b672638cd736fdf08ba259de03edc0254e76c /README.md | |
parent | 41db95ada5a390d1add43c63ad831fccd9c69b90 (diff) | |
download | svg.js-5020240e4029a61a9620f21d7be4d9764e7723d1.tar.gz svg.js-5020240e4029a61a9620f21d7be4d9764e7723d1.zip |
Added SVG.supported to README
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -33,6 +33,19 @@ By default the svg canvas follows the dimensions of its parent, in this case `#p var draw = svg('paper').size('100%', '100%'); ``` +### Checking for SVG support + +By default this library assumes the client's browser supports SVG. You can test support as follows: + +```javascript +if (SVG.supported) { + var draw = svg('paper'); + var rect = draw.rect(100, 100); +} else { + alert('SVG not supported'); +} +``` + ## Elements |