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

Method _getShadowRoot

src/cdk/drag-drop/drag-ref.ts:1562–1568  ·  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

1560 * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.
1561 */
1562 private _getShadowRoot(): ShadowRoot | null {
1563 if (this._cachedShadowRoot === undefined) {
1564 this._cachedShadowRoot = _getShadowRoot(this._rootElement);
1565 }
1566
1567 return this._cachedShadowRoot;
1568 }
1569
1570 /** Gets the element into which the drag preview should be inserted. */
1571 private _getPreviewInsertionPoint(

Callers 2

_startDragSequenceMethod · 0.95

Calls 1

_getShadowRootFunction · 0.90

Tested by

no test coverage detected