From 0d45dcab976af528be099baaab7b1fbacb83ecb3 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Sat, 27 Jul 2024 10:53:57 +0100 Subject: [PATCH] improve errors --- invoker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/invoker.js b/invoker.js index 252b870..8ff5a34 100644 --- a/invoker.js +++ b/invoker.js @@ -123,11 +123,11 @@ set(targetElement) { if (this.hasAttribute("invokeaction")) { throw new TypeError( - "Element has deprecated `invokeaction` attribute", + "Element has deprecated `invokeaction` attribute, replace with `command`", ); } else if (this.hasAttribute("invoketarget")) { throw new TypeError( - "Element has deprecated `invoketarget` attribute", + "Element has deprecated `invoketarget` attribute, replace with `commandfor`", ); } else if (targetElement === null) { this.removeAttribute("commandfor"); @@ -157,7 +157,7 @@ this.hasAttribute("invoketarget") ) { console.warn( - "Element has deprecated `invoketarget` or `invokeaction` attribute", + "Element has deprecated `invoketarget` or `invokeaction` attribute, use `commandfor` and `command` instead", ); return null; }