diff --git a/files/en-us/web/api/invokeevent/index.md b/files/en-us/web/api/invokeevent/index.md index d7bcb4445c2122a3..1104bdde3aa6c835 100644 --- a/files/en-us/web/api/invokeevent/index.md +++ b/files/en-us/web/api/invokeevent/index.md @@ -7,9 +7,9 @@ browser-compat: api.InvokeEvent {{APIRef("UI Events")}} -The **`InvokeEvent`** interface represents an event notifying the user when a [invoker control](/en-US/docs/Web/API/Invoker_API) is about to invoke an interactive element. +The **`InvokeEvent`** interface represents an event notifying the user when a [invoker control](/en-US/docs/Web/API/Invokers_API) is about to invoke an interactive element. -It is the event object for the `HTMLElement` {{domxref("HTMLElement.invoke_event", "invoke")}} event, which fires elements from an Invoker Control, when the Invoker Control is interacted with (for example when it is clicked). +It is the event object for the `HTMLElement` {{domxref("HTMLElement.invoke_event", "invoke")}} event, which represents an action from an Invoker Control it is invoked (for example when it is clicked or pressed). {{InheritanceDiagram}} diff --git a/files/en-us/web/api/invokers_api/index.md b/files/en-us/web/api/invokers_api/index.md index a3a027dfef8253a6..bab7be478ab9a516 100644 --- a/files/en-us/web/api/invokers_api/index.md +++ b/files/en-us/web/api/invokers_api/index.md @@ -7,18 +7,18 @@ browser-compat: api.HTMLElement.invokers {{DefaultAPISidebar("Invokers API")}} -The **Invokers API** provides developers with a standard, consistent, flexible mechanism for controlling interactive HTML Elements on the page. Invokers allow for declaratively control using HTML attributes for equivalent JavaScript APIs. +The **Invokers API** provides developers with a standard, consistent, flexible mechanism for controlling interactive HTML Elements on the page. Invokers allow for declarative control using HTML attributes for equivalent JavaScript APIs. ## Concepts and usage -It is very common on the web to control interactive elements using {{htmlelement("button")}} elements, adding JavaScript event listeners to control what a button does when pressed. Invokers provide a declarative way to achieve the same effect for simple behaviors, such as toggling a popover, dialog, or details element. +It is very common on the web to control interactive elements using {{htmlelement("button")}} elements, adding JavaScript event listeners to control what a button does when pressed. Invokers provide a declarative way to achieve the same effect for simple behaviors, such as toggling a popover or dialog element. Invokers also allow for custom actions that can control behaviors using JavaScript without adding event listeners to the buttons. ## HTML attributes - [`invoketarget`](/en-US/docs/Web/HTML/Element/button#invoketarget) - - : Turns a {{htmlelement("button")}} or {{htmlelement("input")}} element into a Invoker control button; takes the ID of the element to control as its value. + - : Turns a {{htmlelement("button")}} element or an {{htmlelement("input")}} element (with `type=button`) - into a Invoker control button; takes the ID of the element to control as its value. - [`invokeaction`](/en-US/docs/Web/HTML/Element/button#invokeaction) - : Specifies the action to be performed on the element being controlled by an Invoker {{htmlelement("button")}} or {{htmlelement("input")}}.