Skip to content

Commit 797fa2a

Browse files
committed
Merge pull request chuanxshi#9 from Hello71/patch-1
Add parameter form of setTimeout
2 parents 3c1e9d7 + c7d2f65 commit 797fa2a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎general-patterns/avoiding-eval.html‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
setTimeout(function(){
2525
myFunc(1,2,3);
2626
},1000);
27+
// in supported browsers (i.e. not IE)
28+
setTimeout(myFunc,1000,1,2,3);
2729

2830
// reference
2931
// http://net.tutsplus.com/tutorials/javascript-ajax/the-essentials-of-writing-high-quality-javascript/

0 commit comments

Comments
(0)