MCPcopy Create free account
hub / github.com/UI5/webcomponents / updateShadowRoot

Function updateShadowRoot

packages/base/src/updateShadowRoot.ts:9–20  ·  view source on GitHub ↗
(element: UI5Element)

Source from the content-addressed store, hash-verified

7 * @param element
8 */
9const updateShadowRoot = (element: UI5Element) => {
10 const ctor = element.constructor as typeof UI5Element;
11 const shadowRoot = element.shadowRoot;
12
13 if (!shadowRoot) {
14 console.warn(`There is no shadow root to update`); // eslint-disable-line
15 return;
16 }
17
18 shadowRoot.adoptedStyleSheets = [getComponentStyles(), ...getConstructableStyle(ctor)];
19 ctor.renderer(element, shadowRoot);
20};
21
22export default updateShadowRoot;

Callers 1

_renderFunction · 0.85

Calls 2

getComponentStylesFunction · 0.85
getConstructableStyleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…