* Create an iframe
()
| 28 | * Create an iframe |
| 29 | */ |
| 30 | create() { |
| 31 | return new Promise((resolve, reject) => { |
| 32 | this.createPromise = {resolve, reject}; |
| 33 | this.parent = document.querySelector(this.selector); |
| 34 | this.container = document.createElement('iframe'); |
| 35 | const url = chrome.runtime.getURL(`components/generate-key/genKey.html?id=${this.id}`); |
| 36 | this.container.setAttribute('src', url); |
| 37 | this.container.setAttribute('frameBorder', 0); |
| 38 | this.container.setAttribute('scrolling', 'no'); |
| 39 | this.container.style.width = '100%'; |
| 40 | this.container.style.height = '100%'; |
| 41 | this.parent.appendChild(this.container); |
| 42 | }); |
| 43 | } |
| 44 | |
| 45 | registerEventListener() { |
| 46 | this.port.on('generate-done', this.generateDone); |
no outgoing calls
no test coverage detected