Skip to content

Commit 5f11a97

Browse files
committed
add adoptefStyleSheets to the options
1 parent 9980548 commit 5f11a97

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ export default function register(Component, tagName, propNames, options) {
4747
options && options.shadow
4848
? inst.attachShadow({ mode: options.mode || 'open' })
4949
: inst;
50+
if(options && options.adoptedStyleSheets && inst._root.adoptedStyleSheets){
51+
inst._root.adoptedStyleSheets = options.adoptedStyleSheets;
52+
}
5053
return inst;
5154
}
5255
PreactElement.prototype = Object.create(HTMLElement.prototype);

0 commit comments

Comments
 (0)