I've been trying to figure out how to disable the devtools in Atom Shell . I've tried using a window event listener to no avail. It seems that the devtools-opened window event listener doesn't work. The devtools are still openable by Command+Option+I
shortcut.
mainWindow.on('devtools-opened', function(){
mainWindow.closeDevTools();
});
In the end I went with Mousetrap and had to use a e.preventDefault()
on a Cmd+Shift+I
shortcut listener. I'd rather not have to include the Mousetrap library if it's unnecessary but as of yet I can find nothing.
Does anyone know of a better way?
您是否安装了自定义菜单(即覆盖默认的Atom Shell菜单?)一旦执行此操作,您实际上必须明确实现Devtools快捷方式才能使其正常工作。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.