* Completes the upgrade of the element with the provided implementation. * @param {!./base-element.BaseElement} newImpl * @param {number} upgradeStartTime * @final @private
(newImpl, upgradeStartTime)
| 408 | * @final @private |
| 409 | */ |
| 410 | completeUpgrade_(newImpl, upgradeStartTime) { |
| 411 | this.impl_ = newImpl; |
| 412 | this.upgradeDelayMs_ = win.Date.now() - upgradeStartTime; |
| 413 | this.upgradeState_ = UpgradeState_Enum.UPGRADED; |
| 414 | this.setReadyStateInternal(ReadyState_Enum.BUILDING); |
| 415 | this.classList.remove('amp-unresolved', 'i-amphtml-unresolved'); |
| 416 | this.assertLayout_(); |
| 417 | this.dispatchCustomEventForTesting(AmpEvents_Enum.ATTACHED); |
| 418 | if (!this.R1()) { |
| 419 | this.getResources().upgraded(this); |
| 420 | } |
| 421 | this.signals_.signal(CommonSignals_Enum.UPGRADED); |
| 422 | } |
| 423 | |
| 424 | /** @private */ |
| 425 | assertLayout_() { |
no test coverage detected