xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

Electron All In One

Electron All In One

desktop app

https://www.electronjs.org/docs/api/browser-window

BrowserWindow

创建和控制浏览器窗口。

进程:主进程


// 在主进程中.
const { BrowserWindow } = require('electron')

// 或者从渲染进程中使用 `remote`.
// const { BrowserWindow } = require('electron').remote

let win = new BrowserWindow({ width: 800, height: 600 })
win.on('closed', () => {
  win = null
})

// 加载远程URL
win.loadURL('https://github.com')

// 或加载本地HTML文件
win.loadURL(`file://${__dirname}/app/index.html`)

Electron API

https://electronjs.org/docs/tutorial/first-app

Electron In Action

https://github.com/xgqfrms/electron-app

https://github.com/xgqfrms/electron

refs



©xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


posted @ 2020-05-17 11:55  xgqfrms  阅读(149)  评论(6编辑  收藏  举报