MCPcopy
hub / github.com/angular/components / _supportsShadowDom

Function _supportsShadowDom

src/cdk/platform/features/shadow-dom.ts:12–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11/** Checks whether the user's browser support Shadow DOM. */
12export function _supportsShadowDom(): boolean {
13 if (shadowDomIsSupported == null) {
14 const head = typeof document !== 'undefined' ? document.head : null;
15 shadowDomIsSupported = !!(head && ((head as any).createShadowRoot || head.attachShadow));
16 }
17
18 return shadowDomIsSupported;
19}
20
21/** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */
22export function _getShadowRoot(element: HTMLElement): ShadowRoot | null {

Callers 13

FocusTrapDemoClass · 0.90
stepper.spec.tsFile · 0.90
dialog.spec.tsFile · 0.90
datepicker.spec.tsFile · 0.90
focus-trap.spec.tsFile · 0.90
TestMainComponentClass · 0.90
testbed.spec.tsFile · 0.90
dialog.spec.tsFile · 0.90

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…