From: Matteo Nastasi (mop) Date: Sat, 17 Feb 2007 14:05:41 +0000 (+0000) Subject: aggiunto overload di setTimeout X-Git-Tag: 3.0.0~323 X-Git-Url: http://mop.ddnsfree.com/gitweb/?p=brisk.git;a=commitdiff_plain;h=5611eaa4c6fb429da510127364279223ad60e668 aggiunto overload di setTimeout --- diff --git a/web/commons.js b/web/commons.js index dcd5919..872bdc9 100644 --- a/web/commons.js +++ b/web/commons.js @@ -60,6 +60,39 @@ function $(id) { return document.getElementById(id); } throw Error('setInterval Error\nInvalid function type'); }; }; + + /*Copy the default setTimeout behavior*/ + var nativeSetTimeout = window.setTimeout; + window.setTimeout = function(fn,ms) { + var param = []; + if(arguments.length <= 2) { + return nativeSetTimeout(fn,ms); + } + else { + for(var i=2;i