wcb/demo/index.html
Ayo bef423fde1 feat: support boolean attribute
if no value is passed to an attribute it returns 'true'
2023-11-17 15:42:45 +01:00

27 lines
790 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>WC demo</title>
<script type="module" src="HelloWorld.mjs"></script>
<script type="module" src="SimpleText.mjs"></script>
<script type="module" src="BooleanPropTest.mjs"></script>
</head>
<body>
<hello-world id="hey" data-name="Ayo" emotion="sad"></hello-world>
<p>
<simple-text greeting="hey"></simple-text>
</p>
<p>
<boolean-prop-test></boolean-prop-test>
</p>
<script type="module">
const helloWorld = document.querySelector("hello-world");
setTimeout(() => {
helloWorld.setAttribute("emotion", "excited");
}, 2500);
</script>
</body>
</html>