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

A Boolean value determining if the menu displays in a compact way.

type

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

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

BCD tables only load in the browser

See also