- this adds a new demo web app with vite HMR for development - all examples are covered with e2e tests
22 lines
876 B
HTML
22 lines
876 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>strictProps type enforcement</title>
|
|
<script type="module" src="./index.js"></script>
|
|
<script>try{document.documentElement.dataset.theme=localStorage.getItem('wcb-theme')||(matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light')}catch(e){}</script>
|
|
<link rel="stylesheet" href="../../shell.css" />
|
|
<script type="module" src="../../shell.js"></script>
|
|
</head>
|
|
<body>
|
|
<h1>Prop type enforcement</h1>
|
|
<p>
|
|
By default a type violation is logged (see the console) and skipped. With
|
|
<code>static strictProps = true</code> it throws a <code>TypeError</code>.
|
|
</p>
|
|
<lenient-counter></lenient-counter>
|
|
<hr />
|
|
<strict-counter></strict-counter>
|
|
</body>
|
|
</html>
|