Why is ES7/array polyfill needed despite the tsconfig target is set to ES5

TypeScript does not auto-polyfill code (see microsoft/TypeScript#3101). The “official” reason from the relevant GitHub issue seems to be, as @RyanCavanaugh said: Having the compiler try to figure out which [ES20XX] methods you need, and where to emit them, and when, with controls for people who don’t want the polyfills emitted, and ways to change where … Read more

The best placeholder polyfil script for ie7, ie8 and ie9 [closed]

I recommend you use the jQuery Placeholder polyfill by Mathias Bynens. It supports IE6+ It is 2k minified It does its own feature detection (Modernizr isn’t needed) The code is straightforward. The jQuery selection will vary depending on your selector It is the one polyfill recommended by HTML5Please and is listed on the Modernizr Wiki … Read more

fetch retry request (on failure)

From the fetch docs : fetch(“https://stackoverflow.com/users”) .then(checkStatus) .then(parseJSON) .then(function(data) { console.log(‘succeeded’, data) }).catch(function(error) { console.log(‘request failed’, error) }) See that catch? Will trigger when fetch fails, you can fetch again there. Have a look at the Promise API. Implementation example: function wait(delay){ return new Promise((resolve) => setTimeout(resolve, delay)); } function fetchRetry(url, delay, tries, fetchOptions = … Read more

IE11 – does a polyfill / script exist for CSS variables?

Yes, so long as you’re processing root-level custom properties (IE9+). GitHub: https://github.com/jhildenbiddle/css-vars-ponyfill NPM: https://www.npmjs.com/package/css-vars-ponyfill Demo: https://codepen.io/jhildenbiddle/pen/ZxYJrR From the README: Features Client-side transformation of CSS custom properties to static values Live updates of runtime values in both modern and legacy browsers Transforms <link>, <style>, and @import CSS Transforms relative url() paths to absolute URLs Supports chained … Read more

How do I support Internet Explorer in an Angular 8 application?

According to this issue reply You need to follow the following steps Create a new tsconfig tsconfig.es5.json next to tsconfig.json with the below contents { “extends”: “./tsconfig.json”, “compilerOptions”: { “target”: “es5” } } In angular.json Under projects:yourAppName:architect:build:configurations, add “es5”: { “tsConfig”: “./tsconfig.es5.json” } and projects:yourAppName:architect:serve:configurations add “es5”: { “browserTarget”: “yourAppName:build:es5” } Remember to change yourAppName … Read more