docs: adds Native-UI Open external links and the file manager Fiddle example (#20524)
This commit is contained in:
parent
5733507040
commit
1b61fe780e
3 changed files with 173 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
const { shell } = require('electron')
|
||||
const os = require('os')
|
||||
|
||||
const exLinksBtn = document.getElementById('open-ex-links')
|
||||
const fileManagerBtn = document.getElementById('open-file-manager')
|
||||
|
||||
fileManagerBtn.addEventListener('click', (event) => {
|
||||
shell.showItemInFolder(os.homedir())
|
||||
})
|
||||
|
||||
exLinksBtn.addEventListener('click', (event) => {
|
||||
shell.openExternal('http://electron.atom.io')
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue