Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 695 Bytes

File metadata and controls

13 lines (7 loc) · 695 Bytes

Hello World with polyfill

Question - How do I render a simple web component cross browser?

Continuing with the barebones set up we'll add a polyfill to make our component work across all browsers. Additionally, we'll move our hello-world element into its own file.

The Web Component polyfills can be found here. In this case I'm using the webcomponents-loader.js. This polyfill feature detects what's needed and only adds polyfill(s) if neccessary. In order for it to work I had to listen for the WebComponentsReady event when loading it from a CDN.

Vanilla JS, with polyfills, no imports.

Browser Requirements:

  • Evergreen