(element: UI5Element)
| 7 | * @param element |
| 8 | */ |
| 9 | const 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 | |
| 22 | export default updateShadowRoot; |
no test coverage detected
searching dependent graphs…