diff --git a/packages/scoped-custom-element-registry/src/scoped-custom-element-registry.ts b/packages/scoped-custom-element-registry/src/scoped-custom-element-registry.ts index d46f9228..c646b552 100644 --- a/packages/scoped-custom-element-registry/src/scoped-custom-element-registry.ts +++ b/packages/scoped-custom-element-registry/src/scoped-custom-element-registry.ts @@ -343,6 +343,8 @@ window.HTMLElement = (function HTMLElement(this: HTMLElement) { return instance; } as unknown) as typeof HTMLElement; window.HTMLElement.prototype = NativeHTMLElement.prototype; +window.HTMLElement.prototype.constructor = window.HTMLElement; +Object.setPrototypeOf(window.HTMLElement, NativeHTMLElement); // Helpers to return the scope for a node where its registry would be located const isValidScope = (node: Node) =>