Skip to content

Instantly share code, notes, and snippets.

@valdeirpsr
Created January 9, 2021 19:16
Web Components
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="welcome.js" />
</head>
<body>
<script>
const names = ['Jade', 'Mariana']
for (let name of names) {
const welcome = document.createElement('v-welcome')
welcome.setAttribute('name', name)
document.body.appendChild(welcome)
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment