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

Method create

src/content-scripts/keyBackupContainer.js:32–50  ·  view source on GitHub ↗

* Create an iframe

()

Source from the content-addressed store, hash-verified

30 * Create an iframe
31 */
32 create() {
33 return new Promise((resolve, reject) => {
34 this.createPromise = {resolve, reject};
35 const url = chrome.runtime.getURL(`components/key-backup/backupKey.html?id=${this.id}`);
36 this.parent = document.querySelector(this.selector);
37 this.container = document.createElement('iframe');
38 this.port.emit('set-keybackup-window-props', {
39 host,
40 keyringId: this.keyringId,
41 initialSetup: (this.options.initialSetup === undefined) ? true : this.options.initialSetup
42 });
43 this.container.setAttribute('src', url);
44 this.container.setAttribute('frameBorder', 0);
45 this.container.setAttribute('scrolling', 'no');
46 this.container.style.width = '100%';
47 this.container.style.height = '100%';
48 this.parent.appendChild(this.container);
49 });
50 }
51
52 registerEventListener() {
53 this.port.on('popup-isready', this.onPopupReady);

Callers 1

keyBackupContainerFunction · 0.95

Calls 1

emitMethod · 0.45

Tested by

no test coverage detected