electron/docs/fiddles/native-ui/external-links-file-manager/path-in-file-manager/renderer.js
Kristof Kalocsai 7b28cd33cb 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
2019-10-21 16:16:11 +09:00

8 lines
229 B
JavaScript

const { shell } = require('electron')
const os = require('os')
const fileManagerBtn = document.getElementById('open-file-manager')
fileManagerBtn.addEventListener('click', (event) => {
shell.showItemInFolder(os.homedir())
})