electron/docs/fiddles/native-ui/external-links-file-manager/path-in-file-manager/main.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

25 lines
455 B
JavaScript

const { app, BrowserWindow } = require('electron')
let mainWindow = null
function createWindow () {
const windowOptions = {
width: 600,
height: 400,
title: 'Open Path in File Manager',
webPreferences: {
nodeIntegration: true
}
}
mainWindow = new BrowserWindow(windowOptions)
mainWindow.loadFile('index.html')
mainWindow.on('closed', () => {
mainWindow = null
})
}
app.on('ready', () => {
createWindow()
})