Skip to content

Commit

Permalink
[gem] Default serializable
Browse files Browse the repository at this point in the history
Closed #139
  • Loading branch information
mantou132 committed Apr 13, 2024
1 parent 414d387 commit c6617e6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/gem/src/lib/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ declare global {
interface HTMLElement {
ref: string;
}
// https://dom.spec.whatwg.org/#shadowroot-clonable
interface ShadowRootInit {
clonable?: boolean;
serializable?: boolean;
}
}

function emptyFunction() {
Expand Down Expand Up @@ -134,6 +139,7 @@ export abstract class GemElement<T = Record<string, unknown>> extends HTMLElemen
? this
: this.attachShadow({
mode: options.mode || 'open',
serializable: options.serializable ?? true,
delegatesFocus: options.delegatesFocus,
slotAssignment: options.slotAssignment,
});
Expand Down

0 comments on commit c6617e6

Please sign in to comment.