diff --git a/README.md b/README.md index d6739cd982..4a612b90a7 100644 --- a/README.md +++ b/README.md @@ -97,9 +97,10 @@ For older browsers and platforms (Internet Explorer, Android 4.x, iOS v12 and ol * [`fetch`](https://caniuse.com/fetch): Available from [polyfill.io](https://polyfill.io/). * [`requestAnimationFrame`](https://caniuse.com/requestanimationframe): Available from [polyfill.io](https://polyfill.io/). * [`element.prototype.classList` (`add`/`remove`)](https://caniuse.com/classlist): Available from [polyfill.io](https://polyfill.io/). -* [`URL` API](https://caniuse.com/url): Available from [polyfill.io](https://polyfill.io/). +* [`URL` API](https://caniuse.com/url): Available from [polyfill.io](https://polyfill.io/) or [core-js](https://cdnjs.com/libraries/core-js/). * [`TextDecoder`](https://caniuse.com/textencoder): Available from [polyfill.io](https://polyfill.io/). -* [`Number.isInteger`](https://caniuse.com/isInteger): Available from [polyfill.io](https://polyfill.io/). +* [`Number.isInteger`](https://caniuse.com/isInteger): Available from [polyfill.io](https://polyfill.io/) or [core-js](https://cdnjs.com/libraries/core-js/). +* [`Reflect`](https://caniuse.com/mdn-javascript_builtins_reflect): Available from [core-js](https://cdnjs.com/libraries/core-js/). * [Pointer events](https://caniuse.com/pointer): Use [elm-pep](https://npmjs.com/package/elm-pep) (lightweight) or [pepjs](https://npmjs.com/package/pepjs) (for really, really old browsers). [`ol/source/GeoTIFF`](https://openlayers.org/en/latest/apidoc/module-ol_source_GeoTIFF-GeoTIFFSource.html) requires a browser that supports [ECMAScript 6](https://262.ecma-international.org/6.0/). Additionally a polyfill for [`Promise.allSettled`](https://caniuse.com/mdn-javascript_builtins_promise_allsettled) may be needed. diff --git a/examples/resources/Promise.allSettled.js b/examples/resources/Promise.allSettled.js deleted file mode 100644 index e8822b2db4..0000000000 --- a/examples/resources/Promise.allSettled.js +++ /dev/null @@ -1,21 +0,0 @@ -if (typeof Promise !== 'undefined' && !Promise.allSettled && Array.from) { - Promise.allSettled = - function (promises) { - return Promise.all( - Array.from( - promises, - function (p) { - return p.then ( - function (value) { - return {status: 'fulfilled', value: value}; - } - ).catch( - function (reason) { - return {status: 'rejected', reason: reason}; - } - ); - } - ) - ) - }; -} diff --git a/examples/templates/example.html b/examples/templates/example.html index e60def9d5e..fdead5dd47 100644 --- a/examples/templates/example.html +++ b/examples/templates/example.html @@ -68,8 +68,8 @@ - - + + {{{ extraHead.local }}} {{{ css.tag }}} {{ title }} @@ -194,8 +194,9 @@ <title>{{ title }}</title> <!-- Pointer events polyfill for old browsers, see https://caniuse.com/#feat=pointer --> <script src="https://unpkg.com/elm-pep"></script> - <!-- The line below is only needed for old environments like Internet Explorer and Android 4.x --> - <script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL,TextDecoder,Number.isInteger"></script>{{#if extraHead.remote}} + <!-- The lines below are only needed for old environments like Internet Explorer and Android 4.x --> + <script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,TextDecoder"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/3.18.3/minified.js"></script>{{#if extraHead.remote}} {{ indent extraHead.remote spaces=4 }}{{/if}} <style> .map { diff --git a/examples/webpack/config.mjs b/examples/webpack/config.mjs index 12bd343a34..17cf361776 100644 --- a/examples/webpack/config.mjs +++ b/examples/webpack/config.mjs @@ -26,7 +26,7 @@ export default { module: { rules: [ { - test: /^((?!es2015-)[\s\S])*\.js$/, + test: /^((?!es2015-)[\s\S])*\.m?js$/, use: { loader: 'babel-loader', options: { diff --git a/site/index.html b/site/index.html index 740bfff0d1..6f5a356e6d 100644 --- a/site/index.html +++ b/site/index.html @@ -7,8 +7,9 @@ - - + + +