(port, eventCache)
| 33 | } |
| 34 | |
| 35 | addPort(port, eventCache) { |
| 36 | const {type} = parseViewName(port.name); |
| 37 | if (!this._port && isMainComponentType(type, this)) { |
| 38 | // controller was instantiated without main port |
| 39 | super.initPort(port); |
| 40 | this.initMainPort(port, eventCache); |
| 41 | return; |
| 42 | } |
| 43 | this.ports[type] = new EventHandler(port, this._handlers); |
| 44 | eventCache?.flush(this.ports[type]); |
| 45 | } |
| 46 | |
| 47 | hasPort(...args) { |
| 48 | return Boolean(this.getPort(...args)); |