-
Notifications
You must be signed in to change notification settings - Fork 489
Promise.all and Promise.race seems not to be implemented in webcomponents-lite.js and overwrites previous implementation #800
Comments
It overwrites previously called polyfills. |
Polymer polyfill has an incomplete implementation of Promises webcomponents/webcomponentsjs#800
Polymer polyfill has an incomplete implementation of Promises webcomponents/webcomponentsjs#800
When building the debug version of lite.js, all methods are populated on the Promise$3 object. However when running the closure process the methods are removed. You can see https://github.com/webcomponents/webcomponentsjs/blob/master/webcomponents-lite.js#L100 |
Seems like it could be that closure is missing externs for those methods. |
Promise.prototype.catch is missing in webcomponents-lite also. I have window.Promise defined by bluebird and webcomponents-lite does not contain "if" (https://github.com/webcomponents/webcomponentsjs/blob/master/src/promise.js#L17) that assigns es6-promise conditionally only when is missing. Closure advanced compilation removed this "if" and overwrites bluebird. I've changed closure options in gulpfile to simple and that fixed the issue. |
Hi, looks like the implementation of the Promise polyfill is missing some methods.
And, if it is already implemented thanks to another polyfill, then it overwrites it anyways (and so removes all and race methods)
The text was updated successfully, but these errors were encountered: