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

Method build

src/custom-element.js:611–626  ·  view source on GitHub ↗

* @return {!Promise}

()

Source from the content-addressed store, hash-verified

609 * @return {!Promise}
610 */
611 build() {
612 if (this.buildingPromise_) {
613 return this.buildingPromise_;
614 }
615
616 const readyPromise = this.signals_.whenSignal(
617 CommonSignals_Enum.READY_TO_UPGRADE
618 );
619 return readyPromise.then(() => {
620 if (this.R1()) {
621 const scheduler = getSchedulerForDoc(this.getAmpDoc());
622 scheduler.scheduleAsap(this);
623 }
624 return this.whenBuilt();
625 });
626 }
627
628 /**
629 * Mounts the element by calling the `BaseElement.mountCallback` method.

Callers 2

getImplMethod · 0.95
enqueActionMethod · 0.95

Calls 7

R1Method · 0.95
getAmpDocMethod · 0.95
whenBuiltMethod · 0.95
getSchedulerForDocFunction · 0.90
whenSignalMethod · 0.80
scheduleAsapMethod · 0.80
thenMethod · 0.45

Tested by

no test coverage detected