* Opens the dialog and builds the iframe container. * @param {boolean=} hidden * @return {!Promise<!Dialog>}
(hidden = false)
| 10885 | * @return {!Promise<!Dialog>} |
| 10886 | */ |
| 10887 | open(hidden = false) { |
| 10888 | const iframe = this.iframe_; |
| 10889 | if (iframe.isConnected()) { |
| 10890 | throw new Error('already opened'); |
| 10891 | } |
| 10892 | |
| 10893 | // Attach. |
| 10894 | this.doc_.getBody().appendChild(iframe.getElement()); // Fires onload. |
| 10895 | |
| 10896 | this.graypane_.attach(); |
| 10897 | |
| 10898 | if (hidden) { |
| 10899 | setImportantStyles$1(iframe.getElement(), { |
| 10900 | 'visibility': 'hidden', |
| 10901 | 'opacity': 0, |
| 10902 | }); |
| 10903 | this.hidden_ = hidden; |
| 10904 | } else { |
| 10905 | this.show_(); |
| 10906 | } |
| 10907 | |
| 10908 | return iframe.whenReady().then(() => { |
| 10909 | this.buildIframe_(); |
| 10910 | return this; |
| 10911 | }); |
| 10912 | } |
| 10913 | |
| 10914 | /** |
| 10915 | * Opens the iframe embedded in the given container element. |
nothing calls this directly
no test coverage detected