wcb/demo/index.html
Ayo 6869ccb3e7 feat: more explainer for using WebComponent.props
- update readme with more read/write access explanation and example
- update demo page to use .props
2023-11-18 10:31:12 +01:00

27 lines
762 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 emotion="sad"></hello-world>
<p>
<simple-text></simple-text>
</p>
<p>
<boolean-prop-test is-inline anotherOne></boolean-prop-test>
</p>
<script type="module">
const helloWorld = document.querySelector("hello-world");
setTimeout(() => {
helloWorld.props.emotion = "excited";
}, 2500);
</script>
</body>
</html>