Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Commit 36ad1f1

Browse files
pavloDeshkomichael-ciniawsky
authored andcommitted
docs(README): describe multiple callbacks functionality (#44)
1 parent dfe415a commit 36ad1f1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ waitForChunk(function(file) {
3333
// var file = require("./file.js");
3434
});
3535
// wraps the require in a require.ensure block
36+
37+
// Multiple callbacks can be added. They will be executed in the order of addition.
38+
waitForChunk(callbackTwo);
39+
waitForChunk(callbackThree);
40+
// If a callback is added after dependencies were loaded, it will be called immediately.
3641
```
3742

3843
The file is requested when you require the bundle loader. If you want it to request it lazy, use:

0 commit comments

Comments
 (0)