* @return {!Promise}
()
| 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. |
no test coverage detected