<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>1way binding</title>
<script type="module" src="1way.js"></script>
<script type="module">
import { useState } from "./1way.js";
const [k, setK] = useState(3, "k");
document.querySelector("input").oninput = ({ target }) => {
setK(target.value);
};
</script>
</head>
<body>
<pre id="code">
</pre>
<div>
<h1>Demo</h1>
<input bind="{k}" type="range" min="0" max="100" />
<br />
<span bind="span {k}"></span>
<br />
<input type="text" bind="{k} minutes input" />
<br />
<span integrate="{k}">The number "{k}" was integrated into this span tag lel ignore this is a test{k}</span>
</div>
</body>
</html>
Demo
The number "{k}" was integrated into this span tag lel ignore this is a test{k}