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.
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.
HTMLMenuElement()Returns a newly constructed HTMLMenuElement.
Inherits properties from its parent, HTMLElement, and its ancestors.
compact Deprecated
A Boolean value determining if the menu displays in a compact way.
type Deprecated Non-standard
Returns context if the menu is a context menu. This use of the <menu> element has never been implemented widely and is now deprecated.
label Deprecated 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.
Inherits methods from its parent, HTMLElement, and its ancestors.
HTMLMenuElement doesn't implement specific methods.
| Specification |
|---|
| HTML Standard # htmlmenuelement |
| 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 |
© 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