Web components, attaching template content to the DOM
let infoCard = document.querySelector('#info-card'); | |
let bodyElement = document.querySelector('body'); | |
let infoCardInstance = document.importNode(infoCard.content, true); | |
bodyElement.appendChild(infoCardInstance); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment