There was an error while loading. Please reload this page.
With the ContextMenu constructor you can create floating menus inside Graviton.
Example:
function entry(API){ const myContextMenu = new API.ContextMenu({ list: [ { label:'Option 1', action(){ console.log('Clicked option 1') } } ], parent: document.body, x: 100, y: 100 }) }
You must pass an object with some properties:
Example using event instead of x and y:
function entry(API){ document.getElementById('App').onclick = e => { const myContextMenu = new API.ContextMenu({ list: [ { label:'Option 1', action(){ console.log('Clicked option 1') } } ], parent: document.body, event: e }) } }
Documentation
Tutorials
Contributing
About