* Lazily resolves and returns the shadow root of the element. We do this in a function, rather * than saving it in property directly on init, because we want to resolve it as late as possible * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the * con
()
| 785 | * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`. |
| 786 | */ |
| 787 | private _getShadowRoot(): DocumentOrShadowRoot { |
| 788 | if (!this._cachedShadowRoot) { |
| 789 | const shadowRoot = _getShadowRoot(this._container); |
| 790 | this._cachedShadowRoot = shadowRoot || this._document; |
| 791 | } |
| 792 | |
| 793 | return this._cachedShadowRoot; |
| 794 | } |
| 795 | |
| 796 | /** Notifies any siblings that may potentially receive the item. */ |
| 797 | private _notifyReceivingSiblings() { |
no test coverage detected