diff --git a/src/WebComponents/build-lite.json b/src/WebComponents/build-lite.json index 4ad8880..17199b2 100644 --- a/src/WebComponents/build-lite.json +++ b/src/WebComponents/build-lite.json @@ -5,7 +5,11 @@ "../MutationObserver/MutationObserver.js", "../Template/Template.js", "../HTMLImports/build.json", - "../CustomElements/build.json", + "Promise.js", + "../../custom-elements/custom-elements.min.js", + "../../shadydom/shadydom.min.js", + "../../shadycss/shadycss.min.js", + "lang.js", "dom.js", "unresolved.js" ] diff --git a/src/WebComponents/dom.js b/src/WebComponents/dom.js index 13fc8c8..cb20fb7 100644 --- a/src/WebComponents/dom.js +++ b/src/WebComponents/dom.js @@ -128,31 +128,4 @@ window.MouseEvent.prototype = origMouseEvent.prototype; } - if (!Array.from) { - Array.from = function (object) { - return [].slice.call(object); - }; - } - - if (!Object.assign) { - function assign(target, source) { - var n$ = Object.getOwnPropertyNames(source); - for (var i=0, p; i < n$.length; i++) { - p = n$[i]; - target[p] = source[p]; - } - } - - Object.assign = function(target, sources) { - var args = [].slice.call(arguments, 1); - for (var i=0, s; i < args.length; i++) { - s = args[i]; - if (s) { - assign(target, s); - } - } - return target; - } - } - })(window.WebComponents); diff --git a/src/WebComponents/lang.js b/src/WebComponents/lang.js index e240b28..1c342ed 100644 --- a/src/WebComponents/lang.js +++ b/src/WebComponents/lang.js @@ -10,18 +10,47 @@ (function(scope) { -// Old versions of iOS do not have bind. + 'use strict'; -if (!Function.prototype.bind) { - Function.prototype.bind = function(scope) { - var self = this; - var args = Array.prototype.slice.call(arguments, 1); - return function() { - var args2 = args.slice(); - args2.push.apply(args2, arguments); - return self.apply(scope, args2); + // Old versions of iOS do not have bind. + if (!Function.prototype.bind) { + Function.prototype.bind = function(scope) { + var self = this; + var args = Array.prototype.slice.call(arguments, 1); + return function() { + var args2 = args.slice(); + args2.push.apply(args2, arguments); + return self.apply(scope, args2); + }; }; - }; -} + } + + // ES6 stuff + if (!Array.from) { + Array.from = function (object) { + return [].slice.call(object); + }; + } + + if (!Object.assign) { + function assign(target, source) { + var n$ = Object.getOwnPropertyNames(source); + for (var i=0, p; i < n$.length; i++) { + p = n$[i]; + target[p] = source[p]; + } + } + + Object.assign = function(target, sources) { + var args = [].slice.call(arguments, 1); + for (var i=0, s; i < args.length; i++) { + s = args[i]; + if (s) { + assign(target, s); + } + } + return target; + } + } })(window.WebComponents); diff --git a/webcomponents-lite.js b/webcomponents-lite.js index f0f6869..fdca201 100644 --- a/webcomponents-lite.js +++ b/webcomponents-lite.js @@ -61,6 +61,7 @@ '../../shadycss/shadycss.min.js', 'WebComponents/post-polyfill.js', // these scripts are loaded here due to polyfill timing issues + 'WebComponents/lang.js', 'WebComponents/dom.js', 'WebComponents/unresolved.js' ];