()
| 10 | |
| 11 | /** Checks whether the user's browser support Shadow DOM. */ |
| 12 | export 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. */ |
| 22 | export function _getShadowRoot(element: HTMLElement): ShadowRoot | null { |
no outgoing calls
searching dependent graphs…