Closed stevenle closed 1 year ago
The current implementation of register(..., {shadow: true}), always attaches the shadow DOM in {mode: 'open'}. This is a request to add support for {mode: 'closed'} as well.
register(..., {shadow: true})
{mode: 'open'}
{mode: 'closed'}
Relevant docs: https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM#basic_usage
I'm happy to send a PR to support the above. The way I see it there are two options:
1) In addition to the option{shadow: true}, add support for {shadow: 'open'} and {shadow: 'closed'}.
{shadow: true}
{shadow: 'open'}
{shadow: 'closed'}
2) Add a new option called mode, e.g.: {shadow: true, mode: 'closed'}.
mode
{shadow: true, mode: 'closed'}
Let me know which option is preferred and I'm happy to send over the PR, including updating the @types/ package.
@types/
The current implementation of
register(..., {shadow: true})
, always attaches the shadow DOM in{mode: 'open'}
. This is a request to add support for{mode: 'closed'}
as well.Relevant docs: https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM#basic_usage
I'm happy to send a PR to support the above. The way I see it there are two options:
1) In addition to the option
{shadow: true}
, add support for{shadow: 'open'}
and{shadow: 'closed'}
.2) Add a new option called
mode
, e.g.:{shadow: true, mode: 'closed'}
.Let me know which option is preferred and I'm happy to send over the PR, including updating the
@types/
package.