Skip to content

ntix/binding

Repository files navigation

@ntix/bind

A small dom binder

github.com/ntix/binding

copied from github.com/MrAntix/bind

and converted to Deno deno.land

example

<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>

About

A small dom binder

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published