add text/6to5 to browser compilation script types

This commit is contained in:
Sebastian McKenzie 2014-11-04 09:13:50 +11:00
parent d3c5b8ef0b
commit c4cadd8a64

View File

@ -59,15 +59,15 @@ transform.load = function (url, callback, opts, hold) {
var runScripts = function () {
var scripts = [];
var types = ["text/ecmascript-6"];
var types = ["text/ecmascript-6", "text/6to5"];
var index = 0;
var execute = function () {
var exec = function () {
var param = scripts[index];
if (param instanceof Array) {
transform.run.apply(transform, param);
index++;
execute();
exec();
}
};
@ -77,7 +77,7 @@ var runScripts = function () {
if (script.src) {
transform.load(script.src, function(param) {
scripts[i] = param;
execute();
exec();
}, opts, true);
} else {
opts.filename = "embedded";
@ -95,7 +95,7 @@ var runScripts = function () {
run(scripts[i], i);
}
execute();
exec();
};
if (window.addEventListener) {