MCPcopy
hub / github.com/ampproject/amphtml / constructor

Method constructor

src/service/ampdoc-impl.js:795–805  ·  view source on GitHub ↗

* @param {!Window} win * @param {!AmpDocOptions=} opt_options

(win, opt_options)

Source from the content-addressed store, hash-verified

793 * @param {!AmpDocOptions=} opt_options
794 */
795 constructor(win, opt_options) {
796 super(win, /* parent */ null, opt_options);
797
798 /** @private @const {!Promise<!Element>} */
799 this.bodyPromise_ = this.win.document.body
800 ? Promise.resolve(this.win.document.body)
801 : waitForBodyOpenPromise(this.win.document).then(() => this.getBody());
802
803 /** @private @const {!Promise} */
804 this.readyPromise_ = whenDocumentReady(this.win.document);
805 }
806
807 /** @override */
808 isSingleDoc() {

Callers

nothing calls this directly

Calls 5

getBodyMethod · 0.95
waitForBodyOpenPromiseFunction · 0.90
whenDocumentReadyFunction · 0.90
resolveMethod · 0.80
thenMethod · 0.45

Tested by

no test coverage detected