MCPcopy Create free account
hub / github.com/ampproject/amphtml / constructor

Method constructor

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

* @param {!Window} win * @param {string} url * @param {!ShadowRoot} shadowRoot * @param {!AmpDocOptions=} opt_options

(win, url, shadowRoot, opt_options)

Source from the content-addressed store, hash-verified

863 * @param {!AmpDocOptions=} opt_options
864 */
865 constructor(win, url, shadowRoot, opt_options) {
866 super(win, /* parent */ null, opt_options);
867 /** @private @const {string} */
868 this.url_ = url;
869 /** @private @const {!ShadowRoot} */
870 this.shadowRoot_ = shadowRoot;
871
872 /** @private {?Element} */
873 this.body_ = null;
874
875 const bodyDeferred = new Deferred();
876
877 /** @private {!Promise<!Element>} */
878 this.bodyPromise_ = bodyDeferred.promise;
879
880 /** @private {function(!Element)|undefined} */
881 this.bodyResolver_ = bodyDeferred.resolve;
882
883 /** @private {boolean} */
884 this.ready_ = false;
885
886 const readyDeferred = new Deferred();
887
888 /** @private {!Promise} */
889 this.readyPromise_ = readyDeferred.promise;
890
891 /** @private {function()|undefined} */
892 this.readyResolver_ = readyDeferred.resolve;
893 }
894
895 /** @override */
896 isSingleDoc() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected