|
@@ -134,13 +134,13 @@ execute and trace dependencies and call the factory function *synchronously*,
|
|
to keep the behavior in line with Node's synchronous dependency tracing.
|
|
to keep the behavior in line with Node's synchronous dependency tracing.
|
|
|
|
|
|
The exception: calling AMD's callback-style require() from inside a factory
|
|
The exception: calling AMD's callback-style require() from inside a factory
|
|
-function. The require callback is called on process.nextTick():
|
|
|
|
|
|
+function. Then require and the callback is called on process.nextTick():
|
|
|
|
|
|
```javascript
|
|
```javascript
|
|
define(function (require) {
|
|
define(function (require) {
|
|
require(['a'], function(a) {
|
|
require(['a'], function(a) {
|
|
- //'a' is loaded synchronously, but
|
|
|
|
- //this callback is called on process.nextTick().
|
|
|
|
|
|
+ //both 'a' is loaded, and this callback is called
|
|
|
|
+ //on process.nextTick().
|
|
});
|
|
});
|
|
});
|
|
});
|
|
```
|
|
```
|