polyfills

Is it possible to break away from await Promise.all when any promise has fulfilled (Chrome 80)

南楼画角 提交于 2021-02-16 16:11:24
问题 I need to send a request to multi-servers to see which server will response to my request and if any of them response, I will then further interact with this server. The simplest way is to send my request in sequence, something like this async function probing(servers) { for (const server of servers) { const result = await fetch(server) if (result.status == 200) { return result } } } But I hope to speed up the probing process so I change my code to async function probing(servers) { results =

React polyfills for ie >= 9

回眸只為那壹抹淺笑 提交于 2021-02-11 13:56:51
问题 I'm trying to set up React App for IE 9+ browsers. Here is my current src. package.json { "name": "react-ts-template", "version": "0.1.0", "private": true, "dependencies": { "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", "@types/jest": "^24.0.0", "@types/node": "^12.0.0", "@types/react": "^16.9.0", "@types/react-dom": "^16.9.0", "@types/crypto-js": "3.1.44", "react": "^16.13.1", "react-dom": "^16.13.1", "react-scripts": "3.4

React app not rendering in IE 11 even with polyfills

无人久伴 提交于 2021-02-11 06:13:34
问题 I have a fully built React application that I would like to deploy on IE 11, but been having no success but a white page. For the sake of testing, I created a dummy app using npx create-react-app and attempted to launch on IE 11/Edge. Installing 'react-app-polyfill' and importing on 'react-app-polyfill/ie11' and 'react-app-polyfill/stable' on line 1 & 2 of index.js, I also included "last 1 ie version" in the browserlist.development inside the package.json file. Every resource online points to

Why am I getting “ReferenceError: 'TextEncoder' is undefined” in IE11 after importing the text-encoding polyfill?

老子叫甜甜 提交于 2021-02-08 12:50:08
问题 I am trying to pollyfill a library fetch-readablestream (https://github.com/jonnyreeves/fetch-readablestream). I have added the polyfills and most things do work but I keep getting an error about TextEncoder ERROR ReferenceError: 'TextEncoder' is undefined I've added the required pollyfills: web-streams-polyfill, text-encoding, and babel-polyfill. I tried other equivalents of these polyfills but I get the same issue. My polyfills.ts file after the required IE imports that I uncommented.

Are Web Components actually useable in IE11 and Edge?

回眸只為那壹抹淺笑 提交于 2021-02-05 20:19:25
问题 Web Components are the hot new thing, and a true web standard, everybody is talking about them and presumably using them, and they seemed like the perfect solution to a problem we have (sharing components across very different sites). So we build a couple of web components. The work fine in Chrome, but not in IE11. Use polyfills maybe? https://www.webcomponents.org/polyfills has a ton of polyfills, but IE11 keeps complaining about class . Compile down to ES5 perhaps? Various sources claim

Are Web Components actually useable in IE11 and Edge?

一笑奈何 提交于 2021-02-05 20:18:15
问题 Web Components are the hot new thing, and a true web standard, everybody is talking about them and presumably using them, and they seemed like the perfect solution to a problem we have (sharing components across very different sites). So we build a couple of web components. The work fine in Chrome, but not in IE11. Use polyfills maybe? https://www.webcomponents.org/polyfills has a ton of polyfills, but IE11 keeps complaining about class . Compile down to ES5 perhaps? Various sources claim

Unhandled Promise rejection: `(window|global).Promise` has been overwritten

大兔子大兔子 提交于 2021-01-28 05:07:16
问题 My polyfills.ts file contains: import 'core-js/es6'; import 'core-js/es7/reflect'; require('zone.js/dist/zone'); Now I am frequently (but not always) getting thiserror: Unhandled Promise rejection: Zone.js has detected that ZoneAwarePromise (window|global).Promise has been overwritten. Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. How can I fix this? 回答1: this issue have been fixed by https://github

Modernizr - Correct way of loading polyfills / using custom detects

≯℡__Kan透↙ 提交于 2020-12-08 06:25:29
问题 I want to use some new HTML5 form attributes and input types on a webpage. Some browsers already support them, others don't and never will. Thats why I want to use Modernizr - and thats were my trouble begins. To my understanding, Modernizr alone is not a polyfill but a script that can test if the browser is capable of some new HTML5 / CSS3 stuff. If necessary, a polyfill can be loaded which "emulates" these features so they can be used in non-supporting / older browsers. This is correct I