W3cubDocs

/Web APIs

HTMLMenuElement

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.

EventTarget Node Element HTMLElement HTMLMenuElement

Constructor

HTMLMenuElement()

Returns a newly constructed HTMLMenuElement.

Instance properties

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.

Instance methods

Inherits methods from its parent, HTMLElement, and its ancestors.

HTMLMenuElement doesn't implement specific methods.

Specifications

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