The HTMLMenuElement interface provides special properties (beyond those defined on the regular HTMLElement interface it also has available to it by inheritance) for manipulating <menu> elements.
On this page
HTMLMenuElement
Constructor
-
HTMLMenuElement() -
Returns a newly constructed
HTMLMenuElement.
Instance properties
Inherits properties from its parent, HTMLElement, and its ancestors.
compactDeprecated-
A Boolean value determining if the menu displays in a compact way.
typeDeprecated Non-standard-
Returns
contextif the menu is a context menu. This use of the<menu>element has never been implemented widely and is now deprecated. labelDeprecated Non-standard-
A string associating the menu with a name, displayed when the menu is used as a context menu. This use of the
<menu>element has never been implemented widely and is now deprecated.
Instance methods
Inherits methods from its parent, HTMLElement, and its ancestors.
HTMLMenuElement doesn't implement specific methods.
Specifications
| Specification |
|---|
| HTML Standard # htmlmenuelement |
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
HTMLMenuElement |
1 | 12 | 1 | 6 | ≤12.1 | 3 | 4.4 | 18 | 4 | ≤12.1 | 1 | 1.0 |
compact |
1 | 12 | 1 | 6 | ≤12.1 | 3 | 4.4 | 18 | 4 | ≤12.1 | 1 | 1.0 |
See also
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMenuElement