(handler)
| 27 | // Adds a handler to the top of the stack. Returns a unique ID for that handler that can be used |
| 28 | // to remove it later. |
| 29 | push(handler) { |
| 30 | handler.id = ++this.counter; |
| 31 | if (!handler._name) handler._name = `anon-${handler.id}`; |
| 32 | this.stack.push(handler); |
| 33 | return handler.id = ++this.counter; |
| 34 | } |
| 35 | |
| 36 | // As above, except the new handler is added to the bottom of the stack. |
| 37 | unshift(handler) { |
no outgoing calls
no test coverage detected