faye-websocket
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -48,3 +48,3 @@ var API = { | ||
addEventListener: function(type, listener, useCapture) { | ||
addEventListener: function(eventType, listener, useCapture) { | ||
this._listeners = this._listeners || {}; | ||
@@ -55,3 +55,3 @@ var list = this._listeners[eventType] = this._listeners[eventType] || []; | ||
removeEventListener: function(type, listener, useCapture) { | ||
removeEventListener: function(eventType, listener, useCapture) { | ||
if (!this._listeners || !this._listeners[eventType]) return; | ||
@@ -79,9 +79,6 @@ | ||
var args = Array.prototype.slice.call(arguments), | ||
eventType = args.shift(); | ||
if (!this._listeners || !this._listeners[event.type]) return; | ||
if (!this._listeners || !this._listeners[eventType]) return; | ||
this._listeners[eventType].forEach(function(listener) { | ||
listener.apply(this, args); | ||
this._listeners[event.type].forEach(function(listener) { | ||
listener(event); | ||
}, this); | ||
@@ -88,0 +85,0 @@ } |
@@ -7,3 +7,3 @@ { "name" : "faye-websocket" | ||
, "version" : "0.1.0" | ||
, "version" : "0.1.1" | ||
, "engines" : {"node": ">=0.4.0"} | ||
@@ -10,0 +10,0 @@ , "main" : "./lib/faye/websocket" |
@@ -54,3 +54,3 @@ var Client = require('../../../lib/faye/websocket/client') | ||
var self = this | ||
this._ws.onmessage = function(message) { self._message = message.data } | ||
this._ws.addEventListener('message', function(message) { self._message = message.data }) | ||
callback() | ||
@@ -57,0 +57,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 4 instances in 1 package
6
49868
19
1050