shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
adoptStyleInShadowRoot
Type:Function
Status:stable
Since:1.0.0
Platform:js
@blackbyte.sugar.js.dom.css
This function allows you to make a shadowRoot element adopt his host context styles
Params
- $shadowRoot*-HTMLShadowRootElement
The shadow root you want to adopt the $context styles
- $context”document”HTMLElement
The context from which you want to adopt the styles
Return
- -Promise
Return a promise fullfilled when the styles have been adopted
Example
import { adoptStyleInShadowRoot } from '@blackbyte/sugar/css';
const myShadowRoot = $myElement.shadowRoot;
await adoptStyleInShadowRoot(myShadowRoot);Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.com