Skip to content
This repository has been archived by the owner on Jul 13, 2020. It is now read-only.

Commit

Permalink
0.16.6
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Apr 28, 2015
1 parent 0210452 commit dff97c6
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 39 deletions.
4 changes: 2 additions & 2 deletions dist/es6-module-loader-sans-promises.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/es6-module-loader-sans-promises.js.map

Large diffs are not rendered by default.

38 changes: 22 additions & 16 deletions dist/es6-module-loader-sans-promises.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -1055,18 +1055,26 @@ function logloads(loads) {
// by doing m instanceof Module
var m = new Module();

for (var key in obj) {
(function (key) {
defineProperty(m, key, {
configurable: false,
enumerable: true,
get: function () {
return obj[key];
}
});
})(key);
var pNames;
if (Object.getOwnPropertyNames && obj != null) {
pNames = Object.getOwnPropertyNames(obj);
}
else {
pNames = [];
for (var key in obj)
pNames.push(key);
}

for (var i = 0; i < pNames.length; i++) (function(key) {
defineProperty(m, key, {
configurable: false,
enumerable: true,
get: function () {
return obj[key];
}
});
})(pNames[i]);

if (Object.preventExtensions)
Object.preventExtensions(m);

Expand Down Expand Up @@ -1232,8 +1240,7 @@ function logloads(loads) {


(function() {
var isWorker = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;
var isBrowser = typeof window != 'undefined' && !isWorker;
var isBrowser = typeof window != 'undefined' && typeof document != 'undefined';
var isWindows = typeof process != 'undefined' && !!process.platform.match(/^win/);
var Promise = __global.Promise || require('when/es6-shim/Promise');

Expand Down Expand Up @@ -1385,7 +1392,7 @@ function logloads(loads) {

$__Object$defineProperty(SystemLoader.prototype, "global", {
get: function() {
return isBrowser ? window : (isWorker ? self : __global);
return __global;
},

enumerable: false
Expand Down Expand Up @@ -1530,7 +1537,7 @@ function logloads(loads) {

// <script type="module"> support
// allow a data-init function callback once loaded
if (isBrowser && typeof document.getElementsByTagName != 'undefined') {
if (isBrowser && document.getElementsByTagName) {
var curScript = document.getElementsByTagName('script');
curScript = curScript[curScript.length - 1];

Expand Down Expand Up @@ -1583,5 +1590,4 @@ function __eval(__source, __global, __load) {
}
}

})(typeof window != 'undefined' ? window : (typeof WorkerGlobalScope != 'undefined' ?
self : global));
})(typeof window != 'undefined' ? window : (typeof global != 'undefined' ? global : self));
4 changes: 2 additions & 2 deletions dist/es6-module-loader.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/es6-module-loader.js.map

Large diffs are not rendered by default.

38 changes: 22 additions & 16 deletions dist/es6-module-loader.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -2325,18 +2325,26 @@ function logloads(loads) {
// by doing m instanceof Module
var m = new Module();

for (var key in obj) {
(function (key) {
defineProperty(m, key, {
configurable: false,
enumerable: true,
get: function () {
return obj[key];
}
});
})(key);
var pNames;
if (Object.getOwnPropertyNames && obj != null) {
pNames = Object.getOwnPropertyNames(obj);
}
else {
pNames = [];
for (var key in obj)
pNames.push(key);
}

for (var i = 0; i < pNames.length; i++) (function(key) {
defineProperty(m, key, {
configurable: false,
enumerable: true,
get: function () {
return obj[key];
}
});
})(pNames[i]);

if (Object.preventExtensions)
Object.preventExtensions(m);

Expand Down Expand Up @@ -2502,8 +2510,7 @@ function logloads(loads) {


(function() {
var isWorker = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;
var isBrowser = typeof window != 'undefined' && !isWorker;
var isBrowser = typeof window != 'undefined' && typeof document != 'undefined';
var isWindows = typeof process != 'undefined' && !!process.platform.match(/^win/);
var Promise = __global.Promise || require('when/es6-shim/Promise');

Expand Down Expand Up @@ -2655,7 +2662,7 @@ function logloads(loads) {

$__Object$defineProperty(SystemLoader.prototype, "global", {
get: function() {
return isBrowser ? window : (isWorker ? self : __global);
return __global;
},

enumerable: false
Expand Down Expand Up @@ -2800,7 +2807,7 @@ function logloads(loads) {

// <script type="module"> support
// allow a data-init function callback once loaded
if (isBrowser && typeof document.getElementsByTagName != 'undefined') {
if (isBrowser && document.getElementsByTagName) {
var curScript = document.getElementsByTagName('script');
curScript = curScript[curScript.length - 1];

Expand Down Expand Up @@ -2853,5 +2860,4 @@ function __eval(__source, __global, __load) {
}
}

})(typeof window != 'undefined' ? window : (typeof WorkerGlobalScope != 'undefined' ?
self : global));
})(typeof window != 'undefined' ? window : (typeof global != 'undefined' ? global : self));
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "es6-module-loader",
"description": "An ES6 Module Loader shim",
"version": "0.16.5",
"version": "0.16.6",
"homepage": "https://github.com/ModuleLoader/es6-module-loader",
"author": {
"name": "Guy Bedford, Luke Hoban, Addy Osmani",
Expand Down

0 comments on commit dff97c6

Please sign in to comment.