No Password Management

    jts-events
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    jts-events

    JavaScript Events的TypeScript封装,提供事件的添加、移除等操作。

    安装

    Using npm:

    $ npm install jts-events

    Using yarn:

    $ yarn add jts-events

    示例

    import Events from 'jts-events';
     
    // test for events
    function testHandler(event: any){
        console.log('bala bala bala!');
    }
     
    Events.addEvent(document, 'click', testHandler);
    Events.removeEvent(document, 'click', testHandler);

    API

    Events.addEvent(element: any, type: string, handler: Function, userCapture: boolean = false): void
    Events.removeEvent(element: any, type: string, handler: Function, userCapture: boolean = false): void

    Install

    npm i jts-events

    DownloadsWeekly Downloads

    5

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    6.97 kB

    Total Files

    7

    Last publish

    Collaborators

    • brendan1990