From 83d06b6f8fae363b982628e76c083d3a3dc480ae Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 31 Oct 2014 13:14:34 -0700 Subject: [PATCH] [Framework] Add Promise polyfill Add Promise polyfill to version control. Promise objects are included in ECMAScript 6 and browser support is present, but non-universal. Using the polyfill approach permits the use of Promise directly throughout the application without relying on bleeding-edge browser support. Promises are useful at the framework level particularly because of the number of asynchronous calls made when assembling bundles. Framework layer is WTD-518. --- .../framework/lib/es6-promise-2.0.0.min.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 platform/framework/lib/es6-promise-2.0.0.min.js diff --git a/platform/framework/lib/es6-promise-2.0.0.min.js b/platform/framework/lib/es6-promise-2.0.0.min.js new file mode 100644 index 0000000000..59bc745600 --- /dev/null +++ b/platform/framework/lib/es6-promise-2.0.0.min.js @@ -0,0 +1,18 @@ +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE + * @version 2.0.0 + */ + +(function(){function r(a,b){n[l]=a;n[l+1]=b;l+=2;2===l&&A()}function s(a){return"function"===typeof a}function F(){return function(){process.nextTick(t)}}function G(){var a=0,b=new B(t),c=document.createTextNode("");b.observe(c,{characterData:!0});return function(){c.data=a=++a%2}}function H(){var a=new MessageChannel;a.port1.onmessage=t;return function(){a.port2.postMessage(0)}}function I(){return function(){setTimeout(t,1)}}function t(){for(var a=0;a