hee-event-system
TypeScript icon, indicating that this package has built-in type declarations

1.0.3-alpha • Public • Published

Event binding library for Web Components

how to use:

import { bindEventsMethods } 'hee-event-system';

bindEventsMethods(['click']);

export class Header extends HTMLElement {

    constructor() {
        super();
        const shadow = this.attachShadow({ mode: 'open' });
        shadow.innerHTML = this.render();
    }

    foo(){
        console.log('foo work!');
    }

    foo2(){
        console.log('capture work!');
    }

    render() {
        return `
           <div>
            <button (click)="foo()">click</button>
            <button (click,true)="foo2()">click capture</button>
           </div> 
        `;
    }

   
}

customElements.define('ee-header',Header);

Package Sidebar

Install

npm i hee-event-system

Weekly Downloads

1

Version

1.0.3-alpha

License

MIT

Unpacked Size

6.62 kB

Total Files

4

Last publish

Collaborators

  • nanaevent