HTMLMenuElement

Experimental: This is an experimental technologyCheck 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

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
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
 HTMLMenuItemElement 


Found a problem with this page?

Edit on GitHub
Source on GitHub
Report a problem with this content on GitHub
Want to fix the problem yourself? See our Contribution guide.


Last modified: Jan 13, 2022, by MDN contributors


    
{'path': 'public/docs/dom/htmlmenuelement.html', 'source': 'DevDocs.IO'}