* @param {!Document} doc * @param {!Object =} attrs
(doc, attrs = {})
| 10237 | * @param {!Object<string, string|number>=} attrs |
| 10238 | */ |
| 10239 | constructor(doc, attrs = {}) { |
| 10240 | const mergedAttrs = Object.assign({}, friendlyIframeAttributes, attrs); |
| 10241 | |
| 10242 | /** @private @const {!HTMLIFrameElement} */ |
| 10243 | this.iframe_ = /** @type {!HTMLIFrameElement} */ ( |
| 10244 | createElement(doc, 'iframe', mergedAttrs) |
| 10245 | ); |
| 10246 | |
| 10247 | // Ensure that the new iframe does not inherit any CSS styles. |
| 10248 | resetAllStyles(this.iframe_); |
| 10249 | |
| 10250 | /** @private @const {!Promise} */ |
| 10251 | this.ready_ = new Promise((resolve) => { |
| 10252 | this.iframe_.onload = resolve; |
| 10253 | }); |
| 10254 | } |
| 10255 | |
| 10256 | /** |
| 10257 | * When promise is resolved. |
nothing calls this directly
no test coverage detected