From 5611eaa4c6fb429da510127364279223ad60e668 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Sat, 17 Feb 2007 14:05:41 +0000 Subject: [PATCH] aggiunto overload di setTimeout --- web/commons.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) 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