aboutsummaryrefslogtreecommitdiff
path: root/thirdparty/systemjs/test/tests/advanced-plugin.js
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/systemjs/test/tests/advanced-plugin.js')
-rw-r--r--thirdparty/systemjs/test/tests/advanced-plugin.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/thirdparty/systemjs/test/tests/advanced-plugin.js b/thirdparty/systemjs/test/tests/advanced-plugin.js
new file mode 100644
index 000000000..26c6a450c
--- /dev/null
+++ b/thirdparty/systemjs/test/tests/advanced-plugin.js
@@ -0,0 +1,20 @@
+
+exports.locate = function(load) {
+ return new Promise(function(resolve, reject) {
+ setTimeout(function() {
+ resolve('custom fetch');
+ }, 20);
+ });
+}
+
+exports.fetch = function(load) {
+ return new Promise(function(resolve, reject) {
+ setTimeout(function() {
+ resolve(load.address);
+ }, 20);
+ });
+}
+
+exports.translate = function(load) {
+ load.source = '"deps ./plugin-dep.js"; (typeof window != "undefined" ? window : global).q = "' + load.source + ':' + load.name + '";';
+} \ No newline at end of file