瀏覽代碼

added 'connected' event

master
mortie 8 年之前
父節點
當前提交
65661bc8ee
共有 3 個檔案被更改,包括 7 行新增1 行删除
  1. 5
    0
      README.md
  2. 1
    0
      client.js
  3. 1
    1
      package.json

+ 5
- 0
README.md 查看文件

@@ -36,4 +36,9 @@ var events = WebEvents();
events.on("someevent", function(evt) {
// evt -> { some: "parameters" }
});

// Do something whenever the client connects (or reconnects)
events.on("connection", function() {
// Connected!
});
```

+ 1
- 0
client.js 查看文件

@@ -52,6 +52,7 @@
return;
}

self.emit("connection");
key = res.key;
await();
});

+ 1
- 1
package.json 查看文件

@@ -1,6 +1,6 @@
{
"name": "webevents",
"version": "1.0.2",
"version": "1.1.0",
"description": "A simple library for sending events from the server to the client.",
"main": "index.js",
"scripts": {

Loading…
取消
儲存