`ContextMenu` is a window flag option that shows the context menu when right-clicking on a window. It gives the user access to the devtools for the window or a reload option.
This is an updatable window option a developer can use to declutter or control a user's experience. If you would like to update what the user sees on right click, you will have to declare the `contextMenuSettings` option in your manifest or window option. You can also do this in a view.
Note:
If you want to update what a user can do after it's been declared through the updateOptions API call, you need the `devtools`, `enable`, and `reload` properties in the update option object.
For example, if you are trying to rid the user's ability to access the devtools use the code below:
Code that works:
let window = fin.Window.getCurrentSync()
let newOptions = { contextMenuSettings: {enable: true, devtools: false, reload: true}}
await window.updateOptions(newOptions)
Code that doesn't work:
let window = fin.Window.getCurrentSync()
let newOptions = { contextMenuSettings: {devtools: false}}
await window.updateOptions(newOptions)
For further reading, please refer to the "Window Options" section on this page
Comments
0 comments
Please sign in to leave a comment.