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

Commit 9aeaea3

Browse files
committed
update README to reflect new promises polyfill
1 parent b72057e commit 9aeaea3

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
Dynamically loads ES6 modules in NodeJS and current browsers.
44

5-
The complete combined polyfill comes to 15KB minified, making it suitable for production use, provided that modules are built into ES5 making them independent of Traceur. Build workflows are currently in progress.
6-
75
* Provides an asynchronous loader (`System.import`) to [dynamically load ES6 modules](#getting-started) in all modern browsers including IE9+.
86
* Uses [Traceur](https://github.com/google/traceur-compiler) for compiling ES6 modules and syntax into ES5 in the browser with source map support
97
* Adds support for the `<script type="module">` tag allowing inline module loading.
108
* Loader hooks can be used to [extend the System loader with custom functionality](#creating-a-custom-loader)
119
* [Compatible with NodeJS](#nodejs-support) allowing for server-side module loading
10+
* Polyfills ES6 Promises in the browser with a bundled [when.js](https://github.com/cujojs/when/blob/master/docs/es6-promise-shim.md) implementation.
11+
12+
The complete combined polyfill comes to 22KB minified, making it suitable for production use, provided that modules are built into ES5 making them independent of Traceur. Build workflows are currently in progress.
1213

1314
See the [demo folder](https://github.com/ModuleLoader/es6-module-loader/blob/master/demo/index.html) in this repo for a working example demonstrating both module loading the module tag in the browser.
1415

@@ -351,10 +352,9 @@ function locate(load) {
351352

352353
function fetch(load) {
353354
// return a promise. Alternatively, just use the system fetch
354-
// promise -return System.fetch(load)
355-
var defer = MyPromiseLibrary.createDeferred();
356-
myXhr.get(load.address, defer.resolve, defer.reject);
357-
return defer.promise;
355+
return new Promise(function(resolve, reject) {
356+
myXhr.get(load.address, resolve, reject);
357+
});
358358
}
359359

360360
function translate(load) {
@@ -414,7 +414,7 @@ _Also, please don't edit files in the "dist" subdirectory as they are generated
414414
## Credit
415415
Copyright (c) 2014 Luke Hoban, Addy Osmani, Guy Bedford
416416

417-
Promises Integration from [Promiscuous](https://github.com/RubenVerborgh/promiscuous/), Copyright (c) 2013-2014 Ruben Verborgh, MIT License
417+
ES6 Promises integration from [when.js](https://github.com/cujojs/when/blob/master/docs/es6-promise-shim.md), Copyright (c) 2010-2014 Brian Cavalier, John Hann, MIT License
418418

419419
## License
420420
Licensed under the MIT license.

0 commit comments

Comments
 (0)