From 0cbe2f62accaee88695440b4f6498efc54c09bec Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Sat, 27 Jul 2024 10:54:25 +0100 Subject: [PATCH] use dashed commands --- invoker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/invoker.js b/invoker.js index d9ddaaf..debd99c 100644 --- a/invoker.js +++ b/invoker.js @@ -297,8 +297,8 @@ if (invokee.popover) { const canShow = !invokee.matches(":popover-open"); const shouldShow = - canShow && (command === "togglepopover" || command === "showpopover"); - const shouldHide = !canShow && command === "hidepopover"; + canShow && (command === "toggle-popover" || command === "show-popover"); + const shouldHide = !canShow && command === "hide-popover"; if (shouldShow) { invokee.showPopover(); @@ -307,7 +307,7 @@ } } else if (invokee.localName === "dialog") { const canShow = !invokee.hasAttribute("open"); - const shouldShow = canShow && command === "showmodal"; + const shouldShow = canShow && command === "show-modal"; const shouldHide = !canShow && command === "close"; if (shouldShow) {