Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 903 Bytes

readme.md

File metadata and controls

32 lines (23 loc) · 903 Bytes

@ntix/bind

A small dom binder

Build CodeQL npm version

Documentation and working example

example

<button bind [inner-text]="text" {click}="onClick"></button>

<script type="module">
  import { bind } from './bind.js';

  const context = {
    text: 'click me',
    onClick: e => {

      context.text = 'thanks!';
      setTimeout(() => {
        context.text = 'click me again';
      }, 2000);
    }
  };

  bind(document, context);
</script>