MCPcopy Create free account
hub / github.com/angular/components / _getShadowRoot

Method _getShadowRoot

src/cdk/drag-drop/drop-list-ref.ts:787–794  ·  view source on GitHub ↗

* 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

()

Source from the content-addressed store, hash-verified

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() {

Callers 2

_canReceiveMethod · 0.95
_listenToScrollEventsMethod · 0.95

Calls 1

_getShadowRootFunction · 0.90

Tested by

no test coverage detected