ImFusion Web SDK

MenuItem

A menu item is either an action, a separator, or a recursive submenu.

Extends

Methods

MethodDescription
type()Returns the type of the item as string, either action, separator, or submenu.
isAction()Returns whether the item is of type action.
isSeparator()Returns whether the item is of type separator.
isSubmenu()Returns whether the item is of type submenu.
getSubmenu()Returns the underlying Menu of this item if it is of type submenu.
getAction()Returns the underlying MenuAction of this item if it is of type action.
getSeparator()Returns the underlying MenuSeparator of this item if it is of type separator.

Inherited from ClassHandle

MethodDescription
isAliasOf()Returns true if this handle and other alias the same underlying C++ object.
delete()Releases this JavaScript handle.
deleteLater()Schedules this handle for deferred deletion and returns this handle.
isDeleted()Returns true if this handle has already been deleted.
[dispose]()Releases this handle when the enclosing scope exits, so a handle can be declared with using instead of calling delete() later manually.
clone()Returns a new JavaScript handle aliasing the same underlying C++ object.

type()

ts
type(): string;

Returns the type of the item as string, either action, separator, or submenu.

Returns

string


isAction()

ts
isAction(): boolean;

Returns whether the item is of type action.

Returns

boolean


isSeparator()

ts
isSeparator(): boolean;

Returns whether the item is of type separator.

Returns

boolean


isSubmenu()

ts
isSubmenu(): boolean;

Returns whether the item is of type submenu.

Returns

boolean


getSubmenu()

ts
getSubmenu(): Menu;

Returns the underlying Menu of this item if it is of type submenu.

Returns

Menu

Call this function only if isSubmenu() is true.


getAction()

ts
getAction(): MenuAction;

Returns the underlying MenuAction of this item if it is of type action.

Returns

MenuAction

Call this function only if isAction() is true.


getSeparator()

ts
getSeparator(): MenuSeparator;

Returns the underlying MenuSeparator of this item if it is of type separator.

Returns

MenuSeparator

Call this function only if isSeparator() is true.

On this page