mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
fix(packages): add server-only bundles (#1349)
This commit is contained in:
@@ -50,7 +50,12 @@ const propertyKeys = new Map<string, symbol>();
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export class ReactiveElement extends HTMLElement {
|
||||
// Fallback to an empty class when `HTMLElement` is not available (SSR / Node).
|
||||
// This allows the class definition to evaluate without throwing; instances
|
||||
// are never created on the server.
|
||||
const BaseElement = globalThis.HTMLElement ?? (class {} as unknown as typeof HTMLElement);
|
||||
|
||||
export class ReactiveElement extends BaseElement {
|
||||
/**
|
||||
* User-supplied object that maps property names to
|
||||
* {@linkcode PropertyDeclaration} objects containing options for configuring
|
||||
|
||||
Reference in New Issue
Block a user