| 136540 | this._ = _; |
| 136541 | } |
| 136542 | function parseTypenames(typenames, types) { |
| 136543 | return typenames.trim().split(/^|\s+/).map(function(t) { |
| 136544 | var name = "", i = t.indexOf("."); |
| 136545 | if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); |
| 136546 | if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); |
| 136547 | return { |
| 136548 | type: t, |
| 136549 | name: name |
| 136550 | }; |
| 136551 | }); |
| 136552 | } |
| 136553 | Dispatch.prototype = dispatch.prototype = { |
| 136554 | constructor: Dispatch, |
| 136555 | on: function(typename, callback) { |