Actually, if you import / webcomponentsjs / webcomponents -lite.js polyfill (with Polymer 2.x), it most likely rewrote Promise polyfill. And this polyfill currently has an open catch problem:
https://github.com/webcomponents/webcomponentsjs/issues/837
Where a workaround is offered:
Run the version of WebComponents polyfill to version 1.0.7 or lower.
I looked at webcomponents-lite polyfill for Promise and they replace the definition of Promise if the following is false (I simplified the entry):
Object.prototype.toString.call(window.Promise.resolve()) == "[object Promise]"
However, even if you import Promise polyfill from other sources, they display "[object Object]" , so they are replaced.
Note: webcomponents-lite polyfill for Promise also does not currently provide the Promise.all() method, also probably due to the above problem with the Closure compiler.
Suggested workaround while this problem is not fixed:
Download the polyfill after the polyfill web components.
// load webcomponents polyfills (function() { if ('registerElement' in document && 'import' in document.createElement('link') && 'content' in document.createElement('template')) { // browser has web components } else { // polyfill web components let e = document.createElement('script'); e.src = '/bower_components/webcomponentsjs/webcomponents-lite.js'; document.head.appendChild(e); } // Promise polyfill for IE11, as of 2017/09/07 webcomponents Promise polyfill is broken // (https://github.com/webcomponents/webcomponentsjs/issues/837) if (!window['Promise'] || !window['Promise']['reject']){ // Remove the webcomponents polyfilled Promise object delete window.Promise; // Add own polyfill for Promise let e = document.createElement('script'); e.src = '/lib/promisePolyfill/promise.js'; // or polyfill.io document.head.appendChild(e); } })();
source share