From 09e961253dfe86a32185b25f837027b7f79f3c07 Mon Sep 17 00:00:00 2001 From: Chance Snow Date: Fri, 9 Aug 2024 13:18:22 +0000 Subject: [PATCH] Improve error message when misusing protected `Node._shallowClone` method --- src/dom/node.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dom/node.ts b/src/dom/node.ts index 258378f..a1171eb 100644 --- a/src/dom/node.ts +++ b/src/dom/node.ts @@ -229,7 +229,7 @@ export class Node extends EventTarget { } _shallowClone(): Node { - throw new Error("Illegal invocation"); + throw new Error(`Illegal invocation: \`${Object.getPrototypeOf(this).constructor.name}._shallowClone\` is an abstract method.`); } _remove(skipSetParent = false) {