jstools.js 515 B

123456789101112131415161718192021222324
  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. if(!Array.isArray) {
  12. Array.isArray = function (vArg) {
  13. return Object.prototype.toString.call(vArg) === "[object Array]";
  14. };
  15. }
  16. if (!Object.isSVGElement) {
  17. Object.isSVGElement = function(vArg) {
  18. var str = Object.prototype.toString.call(vArg);
  19. return (str.indexOf("[object SVG") == 0);
  20. };
  21. }