()
| 107 | } |
| 108 | |
| 109 | async getPopup() { |
| 110 | if (this.popup) { |
| 111 | return this.popup; |
| 112 | } |
| 113 | if (this.state.popupId) { |
| 114 | try { |
| 115 | this.popup = await mvelo.windows.getPopup(this.state.popupId, this.state.popupOpenerTabId); |
| 116 | this.popup.addRemoveListener(() => this.onEditorClose({cancel: true})); |
| 117 | return this.popup; |
| 118 | } catch (e) { |
| 119 | this.setState({popupId: null, popupOpenerTabId: null}); |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | async activateComponent() { |
| 125 | (await this.getPopup())?.activate(); |
no test coverage detected