| 24 | } |
| 25 | |
| 26 | init(containerElem) { |
| 27 | this.pgpRange = containerElem; |
| 28 | // check if wrapper element already exists |
| 29 | const wrapper = containerElem.querySelector('.m-extract-wrapper'); |
| 30 | if (wrapper) { |
| 31 | this.pgpElement = wrapper; |
| 32 | } else { |
| 33 | // create container element |
| 34 | this.pgpElement = document.createElement('div'); |
| 35 | this.pgpElement.classList.add('m-extract-wrapper'); |
| 36 | } |
| 37 | this.pgpElement.style.display = 'inline-block'; |
| 38 | // let the element to take as much as it wants if there is a message text, like in `decryptFrame` |
| 39 | // but set min height when empty; we then do similar for the height in `setFrameDim()` |
| 40 | this.pgpElement.style['min-height'] = '400px'; |
| 41 | // set status to attached |
| 42 | this.pgpElement.dataset[FRAME_STATUS] = FRAME_ATTACHED; |
| 43 | this.pgpRange.append(this.pgpElement); |
| 44 | } |
| 45 | |
| 46 | renderFrame() { |
| 47 | super.renderFrame(); |