aboutsummaryrefslogtreecommitdiff
path: root/thirdparty/systemjs/test/tests/amd-dynamic-require.js
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/systemjs/test/tests/amd-dynamic-require.js')
-rw-r--r--thirdparty/systemjs/test/tests/amd-dynamic-require.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/thirdparty/systemjs/test/tests/amd-dynamic-require.js b/thirdparty/systemjs/test/tests/amd-dynamic-require.js
new file mode 100644
index 000000000..6b7315dc3
--- /dev/null
+++ b/thirdparty/systemjs/test/tests/amd-dynamic-require.js
@@ -0,0 +1,19 @@
+define(['require'], function(require) {
+ var cb, module;
+
+ require('./amd-dynamic.js', function(_module) {
+ module = _module;
+
+ if (cb)
+ cb(module);
+ });
+
+ return {
+ onCallback: function(_cb) {
+ if (module)
+ _cb(module);
+ else
+ cb = _cb;
+ }
+ };
+}); \ No newline at end of file