* Requests the element to unload any expensive resources when the element * goes into non-visible state. The scope is up to the actual component. * * Calling this method on unbuilt or unupgraded element has no effect. * * @return {boolean} * @package @final * TODO(
()
| 1725 | * TODO(#31915): remove once R1 migration is complete. |
| 1726 | */ |
| 1727 | unlayoutCallback() { |
| 1728 | assertNotTemplate(this); |
| 1729 | if (!this.isBuilt()) { |
| 1730 | return false; |
| 1731 | } |
| 1732 | this.signals_.signal(CommonSignals_Enum.UNLOAD); |
| 1733 | const isReLayoutNeeded = this.impl_.unlayoutCallback(); |
| 1734 | if (isReLayoutNeeded) { |
| 1735 | this.reset_(); |
| 1736 | } |
| 1737 | this.dispatchCustomEventForTesting(AmpEvents_Enum.UNLOAD); |
| 1738 | return isReLayoutNeeded; |
| 1739 | } |
| 1740 | |
| 1741 | /** @private */ |
| 1742 | unlayout_() { |
nothing calls this directly
no test coverage detected