gs-events
事件分发器(同步)
Last updated 3 years ago by samlv9 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gs-events 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.11                                ...           latest (3 years ago)

12 Versions

  • 1.0.11                                ...           3 years ago
  • 1.0.10                                ...           3 years ago
  • 1.0.9                                ...           3 years ago
  • 1.0.8                                ...           3 years ago
  • 1.0.7                                ...           3 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 6
Last Day 0
Last Week 2
Last Month 5
Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |