(type, data)
| 218 | }; |
| 219 | |
| 220 | _dispatch(type, data) { |
| 221 | let listeners = this.eventListeners[type]; |
| 222 | if (listeners) { |
| 223 | // If any listener throws we end up not calling the other |
| 224 | // listeners. This hopefully makes debugging easier, but |
| 225 | // is different to DOM event listeners. |
| 226 | listeners.forEach(fn => fn({type, data})); |
| 227 | } |
| 228 | }; |
| 229 | |
| 230 | } |
| 231 |
no test coverage detected