Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/utils/shadow-root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ export function createShadowRoot(this: HTMLElement, cmpMeta: d.ComponentRuntimeM
}
}

// Guard against server-side DOM implementations (e.g. Domino) that do not
// provide `attachShadow` on host elements. In those environments we fall
// back gracefully so hydration can continue without crashing (#6605).
if (typeof this.attachShadow !== 'function') {
return;
}

const shadowRoot = this.attachShadow(opts);

// Initialize if undefined, set to CSSStyleSheet or null
Expand Down