How to make own Element or Tag using Shadow DOM | Custom Html Tag using JavaScript
Shadow dom ek tarah se hidden dom hain jo ki apke main code me dikhai nahi deta hain, jab bhi apko apne main code me se kisi part ko separate karna ho tab shadow dom ka upyog kiya jata hain,
sath hi me apna khud ka custom html tag banane ke liye bhi shadow dom ka upyog kar skate hain
In this tutorial, you'll learn how to create custom HTML tags or elements using Shadow DOM and JavaScript. With Shadow DOM, you can encapsulate the styles and functionality of your custom elements, making them reusable and easier to maintain. You'll see step-by-step how to define a custom element using the customElements.define() method, and how to use the attachShadow() method to create a shadow DOM for your element. By the end of this tutorial, you'll be able to create your own custom HTML elements and use them in your web projects.
Timestamps
00:00 Shadow DOM
00:20 What is Shadow DOM
01:20 How to Check Shadow DOM
03:46 Use of Shadow DOM
07:25 Static DOM Creation
12:58 Dynamic DOM Creation
15:29 How to Create Custom Element / Tag
Benefit of shadow DOM
1. No Conflict
2. Create your own HTML TAGs
3. Short Code
4. Common Code
Read More
https://selfimagination.in/tips/shado...
#hindi #selfimagination #javascript #learnjavascript #advancejavascript #timesaving