提交 | 用户 | 时间
|
1ac2bc
|
1 |
if (typeof(console) == "undefined") { |
懒 |
2 |
var console = { |
|
3 |
info: function(){}, |
|
4 |
warn: function(){}, |
|
5 |
error: function(){}, |
|
6 |
log: function(){}, |
|
7 |
time: function(){}, |
|
8 |
timeEnd: function(){} |
|
9 |
}; |
|
10 |
} |
|
11 |
|
|
12 |
if(!Array.isArray) { |
|
13 |
Array.isArray = function (vArg) { |
|
14 |
return Object.prototype.toString.call(vArg) === "[object Array]"; |
|
15 |
}; |
|
16 |
} |
|
17 |
|
|
18 |
if (!Object.isSVGElement) { |
|
19 |
Object.isSVGElement = function(vArg) { |
|
20 |
var str = Object.prototype.toString.call(vArg); |
|
21 |
return (str.indexOf("[object SVG") == 0); |
|
22 |
}; |
|
23 |
} |