mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(dom) isSVG: detect svg -> detect smil svg
This commit is contained in:
parent
1b3d7b6e2e
commit
2bdb1df5dc
1 changed files with 6 additions and 6 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue