docs: Added Native User Interface -> Open path in file manager Fiddle example (#20589)
* docs: Added Native User Interface -> Open path in file manager Fiddle example from electron-api-demos * removed classname from button
This commit is contained in:
parent
4e88633d89
commit
7b28cd33cb
3 changed files with 57 additions and 0 deletions
|
@ -0,0 +1,8 @@
|
|||
const { shell } = require('electron')
|
||||
const os = require('os')
|
||||
|
||||
const fileManagerBtn = document.getElementById('open-file-manager')
|
||||
|
||||
fileManagerBtn.addEventListener('click', (event) => {
|
||||
shell.showItemInFolder(os.homedir())
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue