version 4.x of the framework was re-engineered to work as a standalone Web Component library, with integrations for the latest JavaScript frameworks, like Angular. Ionic can be used in most frontend frameworks with success, including React and Vue…and so on Ionic Official WHEN IT COMES TO IONIC URL: https://ionicframework.com/docs#framework-compatibility
using them in web applications. This is accomplished using encapsulated functionality that is independent of the rest of the code. “Web Components” by MDN WHAT IS WEB COMPONENTS? URL: https://developer.mozilla.org/ja/docs/Web/Web_Components
tags, improves existing HTML tags, de fi nes behavior of tags and so on use <template> to create markup template with dynamic content, but not rendered immediately separates CSS and JS and provides encapsulated function Shadow DOM Custom Elements HTML Templates
and Safari implementations from 2016 ▸ Chrome launched V0 of “Shadow DOM” and “Custom Elements” in 2014 ▸ Now removed, V1 launched in 2016 ▸ Introduced in Firefox in 2018 ▸ Edge in 2020 (when Microsoft switches to Chromium engine) →ɹFinally, stable APIs and browser support 💁
the ‘class’ of ES2015. ▸ We need to use the method “connectedCallback()”, which is called when an element is added to the document WEB COMPONENTS BASICS
this to the “<hello-world>” element ▸ Using the “CustomElementRegistry” interface ▸ The actual methods of the “window.customElements” property are used, and the “de fi ne()” method is used to connect them WEB COMPONENTS BASICS
before, but may be subject to external interference (by CSS, JS) ▸ Shadow DOM solves the encapsulation problem ▸ The “Element.attachShadow()” method for such cases (ƅТƅ)ů ▸ Adds a Shadow DOM tree to a speci fi c element and returns a reference to its ShadowRoot
JavaScript using ShadowRoot ▸ closed: deny access from external JavaScript (returns `null`) ▸ Pre-existing elements containing Shadow DOM, such as `<video>`, are `closed` SHADOW DOM