]> source.dussan.org Git - svg.js.git/commitdiff
Added SVG.supported to README
authorwout <wout@impinc.co.uk>
Fri, 15 Feb 2013 14:58:40 +0000 (15:58 +0100)
committerwout <wout@impinc.co.uk>
Fri, 15 Feb 2013 14:58:40 +0000 (15:58 +0100)
README.md

index 7afe79728fc9b839515478a56918888ebff76b91..5c9a8a999139ed3fdf91dd731a2e5f33e1ffa978 100644 (file)
--- 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