From d54ff6fa9411bc86783cfd69a94900fcac06b008 Mon Sep 17 00:00:00 2001 From: Ayo Date: Sat, 18 Nov 2023 23:30:56 +0100 Subject: [PATCH] fix: illegal invocation --- src/WebComponent.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/WebComponent.js b/src/WebComponent.js index 40ccffc..5f3c2fd 100644 --- a/src/WebComponent.js +++ b/src/WebComponent.js @@ -184,7 +184,10 @@ export class WebComponent extends HTMLElement { #initializeProps() { if (!this.#props) { const { ...clone } = this; - this.#props = new Proxy(clone, this.#handler(this.setAttribute)); + this.#props = new Proxy( + clone, + this.#handler((key, value) => this.setAttribute(key, value)) + ); } } }