1.0.11 • Published 6 years ago

gs-events v1.0.11

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

Build Status

安装

npm i gs-events --save-dev

文档

基本用法

import { Event, EventDispatcher } from "gs-events";

class Node extends EventDispatcher {
    constructor() {
        super();
        this.addEventListener("custom", this.handler);
    }
    
    handler( evt ) {
        console.log("scope:", this);
        console.log("event:", evt);
    }
}

let node = new Node();
node.dispatchEvent(new Event("custom", false, true));
1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago