diff --git a/src/template-instance.ts b/src/template-instance.ts index 4e6ce0c..ca086ae 100644 --- a/src/template-instance.ts +++ b/src/template-instance.ts @@ -40,7 +40,7 @@ function* collectParts(el: DocumentFragment): Generator { const processors = new WeakMap() const parts = new WeakMap>() -export class TemplateInstance extends DocumentFragment { +export class TemplateInstance extends (globalThis.DocumentFragment || EventTarget) { constructor(template: HTMLTemplateElement, params: unknown, processor: TemplateTypeInit = propertyIdentity) { super() // This is to fix an inconsistency in Safari which prevents us from