A small dom binder
copied from github.com/MrAntix/bind
and converted to Deno deno.land
<button bind [inner-text]="text" {click}="onClick"></button>
<script type="module">
import { bind } from './bind.js';
const context = {
text: 'click me',
onClick: e => {
e.stopPropagation();
context.text = 'thanks!';
setTimeout(() => {
context.text = 'click me again';
}, 2000);
}
};
bind(document, context);
</script>