(messageData = {}, focusOptions = {})
| 165 | // sourceFrameId: which frame should the focus when this component is dismissed. |
| 166 | // } |
| 167 | async show(messageData = {}, focusOptions = {}) { |
| 168 | if (focusOptions) { |
| 169 | Utils.assertType({ focus: "boolean", sourceFrameId: "number" }, focusOptions); |
| 170 | } |
| 171 | this.focusOptions = focusOptions; |
| 172 | await this.postMessage(messageData); |
| 173 | this.setIframeVisible(true); |
| 174 | if (this.focusOptions.focus) { |
| 175 | this.iframeElement.focus(); |
| 176 | } |
| 177 | this.showing = true; |
| 178 | } |
| 179 | |
| 180 | async hide(shouldRefocusOriginalFrame) { |
| 181 | if (shouldRefocusOriginalFrame == null) shouldRefocusOriginalFrame = true; |
no test coverage detected