From 1ebe72988219107b79fc40df855a4d72fed65de0 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Mon, 17 Jul 2023 15:39:26 +1000 Subject: [PATCH] Remove togglePopover() supports boolean --- .../api/htmlelement/togglepopover/index.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/files/en-us/web/api/htmlelement/togglepopover/index.md b/files/en-us/web/api/htmlelement/togglepopover/index.md index 5523c866beaac9a..040daf0e27f2f76 100644 --- a/files/en-us/web/api/htmlelement/togglepopover/index.md +++ b/files/en-us/web/api/htmlelement/togglepopover/index.md @@ -33,9 +33,13 @@ togglePopover(force) ### Return value +None ({{jsxref("undefined")}}). + + ## Examples @@ -92,19 +96,24 @@ We also log whether the popup was open or closed after the call, but only if a ` if (HTMLElement.prototype.hasOwnProperty("popover")) { document.addEventListener("keydown", (event) => { if (event.key === "h") { + popover.togglePopover(); + } + }); +} +``` + + You can test this out using the live example below. -{{EmbedLiveSample('Examples', 700, 300)}} +{{EmbedLiveSample('Examples', 700, 290)}} ## Specifications