aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-02-15 15:58:40 +0100
committerwout <wout@impinc.co.uk>2013-02-15 15:58:40 +0100
commit5020240e4029a61a9620f21d7be4d9764e7723d1 (patch)
tree950b672638cd736fdf08ba259de03edc0254e76c /README.md
parent41db95ada5a390d1add43c63ad831fccd9c69b90 (diff)
downloadsvg.js-5020240e4029a61a9620f21d7be4d9764e7723d1.tar.gz
svg.js-5020240e4029a61a9620f21d7be4d9764e7723d1.zip
Added SVG.supported to README
Diffstat (limited to 'README.md')
-rw-r--r--README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/README.md b/README.md
index 7afe797..5c9a8a9 100644
--- a/README.md
+++ b/README.md
@@ -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