Java Script : recall function when some variable not init
1 2 3 4 5 6 7 8 9 10 11 | var init=false; function someFunction(){ if (!init){ var t=this,f=arguments.callee,a=arguments; setTimeout(function(){f.apply(t,a);},100); return; } console.log("init=",init); } someFunction(); init=true; |
No comments:
Post a Comment