Skip to content

Menu

Import:

import { Menu } from 'obsidian-test-mocks/obsidian';

Signature:

export class Menu extends Component

Extends: Component

Constructor

new Menu()

Properties

PropertyTypeDescription
children__Component[]
(Inherited from Component)
cleanups__(() => unknown)[]
(Inherited from Component)
dom__HTMLElement
events__EventRefOriginal[]
(Inherited from Component)
intervals__number[]
(Inherited from Component)
items__(MenuItem | MenuSeparator)[]
loaded__boolean
(Inherited from Component)
sectionSubmenus__Map<string, SectionSubmenu__>

Methods

MethodReturnsDescription
addChild(component)T
(Inherited from Component)
addItem(callback)this
addSeparator()this
asOriginalType__()ComponentOriginal
(Inherited from Component)
asOriginalType2__()MenuOriginal
close()void
constructor__()void
(Inherited from Component)
constructor2__()void
hide()this
load()void
(Inherited from Component)
onHide(callback)void
onload()void
(Inherited from Component)
onunload()void
(Inherited from Component)
register(callback)void
(Inherited from Component)
registerDomEvent(el, type, callback, options?)void
(Inherited from Component)
registerEvent(ref)void
(Inherited from Component)
registerInterval(id)number
(Inherited from Component)
removeChild(component)T
(Inherited from Component)
setNoIcon()this
setParentElement(_el)this
setUseNativeMenu(_useNativeMenu)this
showAtMouseEvent(_event)this
showAtPosition(_position, _doc?)this
unload()void
(Inherited from Component)
static create__()Component
(Inherited from Component)
static create2__()Menu
static forEvent(_event)Menu
static fromOriginalType__(value)Component
(Inherited from Component)
static fromOriginalType2__(value)Menu

Links to this page: