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

Method create

src/content-scripts/editorContainer.js:23–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21 }
22
23 create() {
24 return new Promise((resolve, reject) => {
25 this.createPromise = {resolve, reject};
26 this.parent = document.querySelector(this.selector);
27 this.container = document.createElement('iframe');
28 let quota = '';
29 if (this.options.quota) {
30 quota = `&quota=${this.options.quota}`;
31 }
32 const url = chrome.runtime.getURL(`components/editor/editor.html?id=${this.id}${quota}&embedded=true`);
33 this.container.setAttribute('src', url);
34 this.container.setAttribute('frameBorder', 0);
35 this.container.setAttribute('scrolling', 'no');
36 this.container.style.width = '100%';
37 this.container.style.height = '100%';
38 this.parent.appendChild(this.container);
39 });
40 }
41
42 registerEventListener() {
43 this.port.on('editor-ready', this.onEditorReady);

Callers 1

editorContainerFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected