Skip to content

Commit e6bbe4f

Browse files
stevenlemarvinhagemeister
authored andcommitted
Add support for shadow DOM closed mode
1 parent 8f5264a commit e6bbe4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default function register(Component, tagName, propNames, options) {
55
const inst = Reflect.construct(HTMLElement, [], PreactElement);
66
inst._vdomComponent = Component;
77
inst._root =
8-
options && options.shadow ? inst.attachShadow({ mode: 'open' }) : inst;
8+
options && options.shadow ? inst.attachShadow({ mode: options.mode || 'open' }) : inst;
99
return inst;
1010
}
1111
PreactElement.prototype = Object.create(HTMLElement.prototype);

0 commit comments

Comments
 (0)