Skip to content
0:00 / 0:00

#webcomponents#shadowdom#customelements

Web Components Crash Course

Traversy Media

2.4M subscribers • 10 videos on Hallway

YouTube
  • Recommended by 1 person: 1 on Stack Overflow and its sister sites.
  • Presented by Brad Traversy, creator of Traversy Media
  • May be out of date. Uploaded 6 years ago, in an area where tools change fast.

Beginner. No background in the topic needed.

267K views6 years ago1 recommendation

Web developmentHTTP, REST and GraphQLVue, Svelte, Angular and others

Brad Traversy introduces web components, covering custom elements, shadow DOM, and HTML templates.

This is an introductory crash course on web components including custom elements, shadow DOM and HTML templates. Code: codepen.io/bradtraversy/pen/wvaXKoK 💖 Become a Patron: Show support & get perks! patreon.com/traversymedia Website & Udemy Course Links: traversymedia.com Follow Traversy Media: twitter.com/traversymedia instagram.com/traversymedia facebook.com/traversymedia

Why it's here

1 person recommends this

What people say. Recommended as a clear introduction to web components, custom elements, and shadow DOM.

DevWLon Stack Overflow • Recommends

On “Defining a HTML template to append using jQuery”

Use HTML template instead! Since the accepted answer would represent overloading script method, I would like to suggest another which is, in my opinion, much cleaner and more secure due to XSS risks which come with overloading scripts. I made a demo to show you how to use it in an action and how to inject one template into another, edit and then add to the document DOM. example html <template id="mytemplate"> <style> .image{ width: 100%; height: auto; } </style> <a href="#" class="list-group-item"> <div class="image"> <img src="" /> </div> <p class="list-group-item-text"></p> </a> </template> example js // select var t = document.querySelector('#mytemplate'); // s…