From decade82153d42cbfaee6c3ec486e255f1d1f972 Mon Sep 17 00:00:00 2001 From: guybedford Date: Sat, 9 Nov 2013 12:38:22 +0200 Subject: [PATCH] ie supports --- loader.js | 11 +++++------ test/test-bootstrap.html | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 test/test-bootstrap.html diff --git a/loader.js b/loader.js index 08dd22ee..701f14df 100644 --- a/loader.js +++ b/loader.js @@ -432,7 +432,7 @@ // for plugins, we first need to load the plugin module itself var pluginName = pluginMatch[2]; - jspm.import(pluginName, function(plugin) { + jspm['import'](pluginName, function(plugin) { plugin(options.normalized.substr(0, options.normalized.indexOf('!')), url, jspm.fetch, callback, errback); @@ -754,8 +754,8 @@ return module['default'] ? module['default'] : module; } - var _import = jspm.import; - jspm.import = function(name, callback, errback, referer) { + var _import = jspm['import']; + jspm['import'] = function(name, callback, errback, referer) { _import.call(jspm, name, function() { if (callback) callback.apply(null, checkDefaultOnly(arguments)); @@ -810,7 +810,7 @@ // amd require if (names instanceof Array) - return jspm.import(names, callback, errback, referer); + return jspm['import'](names, callback, errback, referer); // commonjs require else if (typeof names == 'string') @@ -846,8 +846,7 @@ var curPath = scripts[scripts.length - 1].src; var basePath = curPath.substr(0, curPath.lastIndexOf('/') + 1); document.write( - '<' + 'script type="text/javascript" src="' + basePath + 'es6-module-loader.js">' + '<' + '/script>' + - '<' + 'script type="text/javascript">' + 'createLoader();' + '<' + '/script>' + '<' + 'script type="text/javascript" src="' + basePath + 'es6-module-loader.js" data-init="createLoader">' + '<' + '/script>' ); } else { diff --git a/test/test-bootstrap.html b/test/test-bootstrap.html new file mode 100644 index 00000000..ed2464c1 --- /dev/null +++ b/test/test-bootstrap.html @@ -0,0 +1,15 @@ + + + + + + + + + + + + \ No newline at end of file