Skip to content

Commit

Permalink
improve errors
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Jul 27, 2024
1 parent b956980 commit 0d45dca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions invoker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 0d45dca

Please sign in to comment.