Skip to content

Commit

Permalink
add popover attributes/properties/methods/events (#25961)
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus authored Apr 7, 2023
1 parent ef75c17 commit b3df2fc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions files/en-us/web/api/htmlelement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ _Inherits properties from its parent, {{DOMxRef("Element")}}._
As a setter, it replaces the content inside the selected element, converting any line breaks into {{HTMLElement("br")}} elements.
- {{DOMxRef("HTMLElement.inputMode")}}
- : A string value reflecting the value of the element's [`inputmode`](/en-US/docs/Web/HTML/Global_attributes/inputmode) attribute.
- {{DOMxRef("HTMLElement.popover")}}
- : A string value reflecting the value of the element's [`popover`](/en-US/docs/Web/HTML/Global_attributes/popover) attribute.
- {{DOMxRef("HTMLElement.lang")}}
- : A string representing the language of an element's attributes, text, and element contents.
- {{DOMxRef("HTMLElement.noModule")}}
Expand Down Expand Up @@ -88,6 +90,12 @@ _Inherits methods from its parent, {{DOMxRef("Element")}}._
- : Sends a mouse click event to the element.
- {{DOMxRef("HTMLElement.focus()")}}
- : Makes the element the current keyboard focus.
- {{DOMxRef("HTMLElement.hidePopover()")}}
- : Hides the element, if it has a valid {{DOMxRef("HTMLElement.popover")}} value.
- {{DOMxRef("HTMLElement.showPopover()")}}
- : Shows the element, promoting it to the top layer, if it has a valid {{DOMxRef("HTMLElement.popover")}} value.
- {{DOMxRef("HTMLElement.togglePopover()")}}
- : Hides or shows the element, if it has a valid {{DOMxRef("HTMLElement.popover")}} value.

## Events

Expand All @@ -101,6 +109,10 @@ Listen to these events using `addEventListener()` or by assigning an event liste
- : Fired when the user initiates a paste action through the browser's user interface.
- {{domxref("HTMLInputElement/invalid_event", "invalid")}}
- : Fired when an element does not satisfy its constraints during constraint validation.
- {{DOMxRef("HTMLElement.beforetoggle", "beforetoggle")}}
- : Fired when the element is a popover, before it is hidden or shown.
- {{DOMxRef("HTMLElement.toggle", "toggle")}}
- : Fired when the element is a popover, just after it is hidden or shown.

### Animation events

Expand Down
2 changes: 2 additions & 0 deletions files/en-us/web/html/global_attributes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ In addition to the basic HTML global attributes, the following global attributes
- : A cryptographic nonce ("number used once") which can be used by [Content Security Policy](/en-US/docs/Web/HTTP/CSP) to determine whether or not a given fetch will be allowed to proceed.
- [`part`](/en-US/docs/Web/HTML/Global_attributes/part)
- : A space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the {{CSSxRef("::part")}} pseudo-element.
- [`popover`](/en-US/docs/Web/HTML/Global_attributes/popover)
- : Specifies that the element should be treated like a popover. An element with the `popover` attribute is hidden from the page unless it is opened by interacting with an invoking element that has [`popovertarget`](/en-US/docs/Web/HTML/button#popovertarget), or via [`showPopover()`](/en-US/docs/Web/API/HTMLElement/showPopover/).
- [`role`](/en-US/docs/Web/Accessibility/ARIA/Roles)
- : Roles define the semantic meaning of content, allowing screen readers and other tools to present and support interaction with an object in a way that is consistent with user expectations of that type of object. `roles` are added to HTML elements using `role="role_type"`, where `role_type` is the name of a role in the ARIA specification.
- [`slot`](/en-US/docs/Web/HTML/Global_attributes/slot)
Expand Down

0 comments on commit b3df2fc

Please sign in to comment.