repo.or.cz
/
chromium-blink-merge.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Disable view source for Developer Tools.
[chromium-blink-merge.git]
/
chrome
/
test
/
data
/
third_party
/
spaceport
/
js
/
util
/
chainAsync.js
blob
50a180a37718c621524cc8cc8eb0cca6460034d7
1
define([ ], function () {
2
return function chainAsync(functions) {
3
functions = functions.slice();
4
5
function next() {
6
if (functions.length === 0) {
7
return;
8
}
9
10
var fn = functions.shift();
11
fn(function () {
12
setTimeout(next, 0);
13
});
14
}
15
16
setTimeout(next, 0);
17
};
18
});