web components and how we used
Web components "Web Components is a suite of different technologies allowing you to create reusable custom elements — with their functionality encapsulated away from the rest of your code — and utilize them in your web apps." - MDN 3 main technologies Custom elements: define behavior of the component Shadow DOM: a shadow dom is rendered separately from the main document dom, and thus isolated you can create a custom element with a shadow dom HTLM Templates write markup templates steps to build your own web component write the class create a js class for your element which inherits from HTMLElement define a constructor with call to super() register it with the CustomElementRegistry object e.g. customElements.define("word-count", WordCount, { extends: "p" }); the extends is optional, but shows you can extend from existing elements and use like so: <p is="word-count"> terminology update: when extending it called "Custom built i...