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

Method addPort

src/controller/sub.controller.js:35–45  ·  view source on GitHub ↗
(port, eventCache)

Source from the content-addressed store, hash-verified

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

Callers 2

setupDecryptControllerFunction · 0.45
setupEditorControllerFunction · 0.45

Calls 5

initMainPortMethod · 0.95
parseViewNameFunction · 0.90
isMainComponentTypeFunction · 0.90
initPortMethod · 0.80
flushMethod · 0.80

Tested by 2

setupDecryptControllerFunction · 0.36
setupEditorControllerFunction · 0.36