2011-11-02 12:10:58 -04:00
|
|
|
/**
|
|
|
|
* A module of various browser polyfills
|
|
|
|
* @file polyfill.js
|
|
|
|
*/
|
|
|
|
|
2012-04-05 18:39:10 -04:00
|
|
|
/**
|
2014-09-05 11:57:18 -04:00
|
|
|
* Promise.prototype.done polyfill
|
2012-04-05 18:39:10 -04:00
|
|
|
*/
|
2014-09-05 11:57:18 -04:00
|
|
|
if (!Promise.prototype.done) { Promise.prototype.done = function (cb, eb) { this.then(cb, eb).then(null, function (err) { setTimeout(function () { throw err; }, 0); }); }; }
|