Skip to content

Commit

Permalink
feat(runtime-dom): ensure mode is always 'open' when attaching shadow…
Browse files Browse the repository at this point in the history
…Root
  • Loading branch information
padcom committed Feb 28, 2025
1 parent f77ba12 commit 2485cba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/runtime-dom/src/apiCustomElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export type VueElementConstructor<P = {}> = {
export interface CustomElementOptions {
styles?: string[]
shadowRoot?: boolean
shadowRootOptions?: ShadowRootInit
shadowRootOptions?: Omit<ShadowRootInit, 'mode'>
nonce?: string
configureApp?: (app: App) => void
}
Expand Down Expand Up @@ -264,7 +264,7 @@ export class VueElement
)
}
if (_def.shadowRoot !== false) {
this.attachShadow(extend({ mode: 'open' }, _def.shadowRootOptions))
this.attachShadow(extend({}, _def.shadowRootOptions, { mode: 'open' }) as ShadowRootInit)
this._root = this.shadowRoot!
} else {
this._root = this
Expand Down

0 comments on commit 2485cba

Please # to comment.