Changed document.contains to document.body.contains
Changed document.contains to document.body.contains

 The document object in IE does not have the contains function  as a method.  This can cause a stack overflow as you can get stuck in an endless try catch loop.   document.body.contains will work in IE, Firefox, and Chrome and will resolve this issue.
albohlabs/svg.js,dotnetCarpenter/svg.js,dotnetCarpenter/svg.js,albohlabs/svg.js