I am working with Angular 7 and material design. Some of my components utilize ShadowDOM ViewEncapsulation, leading to errors in older versions of IE, Edge, Chrome, and Firefox.
Below is the error message I am encountering:
Object doesn't support property or method 'attachShadow'
I have already included default polyfills but the error persists.
/**
* This file contains essential polyfills required by Angular and must be loaded before the application.
* Additional polyfills can be added here.
*
* The file is divided into two sections:
* 1. Browser polyfills: These are applied prior to loading ZoneJS and are categorized based on browsers.
* 2. Application imports: Files imported after ZoneJS that need to be loaded before your main file.
*
* The current configuration is for "evergreen" browsers; recent versions that update automatically. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on desktop, and iOS 10 and Chrome on mobile.
*
* Learn more at https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE9, IE10 and IE11 require all the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
/**
* For applications indexed by Google Search, this is necessary.
* Googlebot uses a renderer based on Chrome 41.
* https://developers.google.com/search/docs/guides/rendering
**/
import 'core-js/es6/array';
/** IE10 and IE11 need the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/** Reflect API is required for IE10 and IE11. */
import 'core-js/es6/reflect';
/**
* Web Animations `@angular/platform-browser/animations`
* Only if AnimationBuilder is used within the app and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
**/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* parts of macroTask/DomEvents patch can be disabled by setting flags below
*/
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
/*
* In IE/Edge developer tools, addEventListener will also get wrapped by zone.js
* with flag below, it will bypass `zone.js` patch for IE/Edge
*/
// (window as any).__Zone_enable_cross_context_check = true;
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/