diff --git a/lib/client/dom.js b/lib/client/dom.js index 35a4f72e..2e4d672d 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -267,18 +267,18 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; }; /** - * check svg support + * check SVG SMIL animation support */ this.isSVG = function() { - var rect, ret, + var rect, ret, svgNode, create = document.createElementNS, SVG_URL = 'http://www.w3.org/2000/svg'; - if (create) + if (create) { create = create.bind(document); - - rect = create(SVG_URL,'svg').createSVGRect; - ret = !!rect; + svgNode = create(SVG_URL, 'animate'); + ret = /SVGAnimate/.test(toString.call(svgNode)); + } return ret; };