Explain working of custom elements.

550    Asked by Amitraj in Python , Asked on Jan 16, 2020
Answered by Amit raj

The flow chart of the custom elements functionality would be as follows:


Above are the steps in an order about custom elements functionality,

  1. App registers custom elements with the browser: Use the createCustomElement() function to convert a component into a class that can be registered with the browser as a custom element.
  2. App adds custom element to DOM: Add custom element just like a built-in HTML element directly into the DOM.
  3. Browser instantiate component based class: Browser creates an instance of the registered class and adds it to the DOM.
  4. Instance provides content with data binding and change detection: The content within the template is rendered using the component and DOM data.



Your Answer

Interviews

Parent Categories