jcoglan/faye-websocket-node — Issue #3: Event listeners are broken
Author: nicokaiser
Created: 2011-11-29 11:07:41+00:00
State: open

Adding event listeners with addEventListener is broken.

In api.js, e.g. eventType is not defined (must be "type"?).

```javascript
addEventListener: function(type, listener, useCapture) {
this._listeners = this._listeners || {};
var list = this._listeners[eventType] = this._listeners[eventType] || [];
list.push(listener);
},
```

And, the behavior of listeners added with addEventListener seems to be different from on... function:

```javascript
conn.onmessage = function(event) {
console.log(event.data);
}
```

```javascript
conn.addEventListener('message', function(event) {
// event is undefined here
}
```

This should be consistent.