MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / getPopup

Method getPopup

src/controller/editor.controller.js:109–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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();

Callers 6

activateComponentMethod · 0.95
onEditorCloseMethod · 0.95
afterAuthorizationMethod · 0.45
onOpenEditorMethod · 0.45

Calls 3

onEditorCloseMethod · 0.95
addRemoveListenerMethod · 0.80
setStateMethod · 0.45

Tested by

no test coverage detected