dom / latest / htmlmenuelement.html /

HTMLMenuElement

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

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.

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

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

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.

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
1
18
4
≤12.1
1
1.0
compact
1
12
1
6
≤12.1
3
1
18
4
≤12.1
1
1.0
label
No
No
85
8-85
No
No
No
No
No
8-85
Nested menus are not supported.
No
No
No
type
No
12-79
85
8-85
6
No
No
No
No
8-85
No
No
No

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLMenuElement