Constructor
new ContextMenu(target)
Parameters:
Name | Type | Description |
---|---|---|
target |
HTMLElement | string |
- Source:
Methods
close()
close the context-menu
- Source:
dispose()
Dispose the Contextmenu instance and it's content
- Source:
open(node, x, y)
open the context menu for a registered elemebt
at a given location.
Parameters:
Name | Type | Description |
---|---|---|
node |
HTMLElement | |
x |
number | |
y |
number |
- Source:
registerElement(node, menuContent)
Register a new element that should react to
contextmenu events
Parameters:
Name | Type | Description |
---|---|---|
node |
HTMLElemebt | |
menuContent |
Array.<object> |
- Source:
unregisterElement(node)
unregister an Element to disable
contextmenu events
Parameters:
Name | Type | Description |
---|---|---|
node |
HTMLElement |
- Source: