liveBook · Manning

Internet Explorer

As explained in Web Components in Action

Internet Explorer is a web browser whose final major version, Internet Explorer 11, lacks many newer web platform and ECMAScript features.

Internet Explorer 11 is a fixed compatibility target: it lacks Web Components, Shadow DOM, and ES2015 features such as classes and arrow functions. Supporting it requires older JavaScript output and browser-specific fallbacks. section 12.5 section 2.7

A practical IE11 support path combines:

  • Babel with @babel/core, @babel/cli, and @babel/preset-env to transpile modern JavaScript into older JavaScript. section 12.5
  • The custom-elements polyfill to provide Custom Elements support. section 2.7
  • A CSS variables ponyfill when existing component styles depend on CSS custom properties. section 12.5
  • Shadow DOM disabled or adapted, because its CSS behavior cannot be fully polyfilled in IE. section 10.4

Separate modern and IE builds

Bundle components for modern browsers, then run Babel on each generated component file. A combined npm script such as "build-ie" produces slider.build.js, coordpicker.build.js, and colorpicker.build.js for IE11. Load the transpiled script instead of the module entry point, and include the required polyfills before it. section 12.5

npm install --save-dev @babel/core

npm install --save-dev @babel/cli

npm install --save-dev @babel/preset-env

Use the installation commands to begin configuring Babel as development-only build tooling. section 12.5

How Web Components in Action covers it

How deep it goes
Explains feature gaps, Babel configuration, output scripts, polyfills, and CSS fallback, but stops short of exhaustive IE testing.
Examples
Uses IE11 component builds, Babel npm scripts, custom-elements loading, and CSS variables ponyfill initialization.
What it assumes
Assumes component and npm familiarity while teaching the required transpilation and polyfill steps.
What you can do after
Builds and loads transpiled Web Components for IE11 with selected JavaScript, custom-elements, and CSS fallbacks.
How it connects
Connects Internet Explorer with Web Components, custom elements, Shadow DOM, Babel, transpilation, and polyfills.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Web Components in Action. The section links point to the parts of the book it draws on.