当前位置: 首页 > news >正文

asp网站制作工具谷歌浏览器下载官方正版

asp网站制作工具,谷歌浏览器下载官方正版,网站建设PHP开发是什么意思,天津设计公司排名榜electron 开发时最麻烦就是electron版本和node版本的选择和正确安装 electron 用npm安装时太慢容易报错,建议用cnpm i 进行安装 注意最新版渲染进程使用node nodeIntegration: true, // 渲染进程可用node contextIsolation: false, // 这个值影响nodeIntegration是…

electron 开发时最麻烦就是electron版本和node版本的选择和正确安装
electron 用npm安装时太慢容易报错,建议用cnpm i 进行安装

注意最新版渲染进程使用node
nodeIntegration: true, // 渲染进程可用node
contextIsolation: false, // 这个值影响nodeIntegration是否生效electron  的主进程的创建
function createWindow () {// Create the browser window.const mainWindow = new BrowserWindow({width: 800,height: 600,webPreferences: {nodeIntegration: true, // 渲染进程可用nodecontextIsolation: false, // 这个值影响nodeIntegration是否生效preload: path.join(__dirname, 'preload.js')}})// and load the index.html of the app.mainWindow.loadFile(path.join(__dirname, 'index.html'))// Open the DevTools.mainWindow.webContents.openDevTools()// 渲染进程使用remote remote.enable(mainWindow.webContents)//3require("./ipcMain/menu")require("./ipcMain/rightMenu")// 主进程发送消息mainWindow.webContents.send("mainMag","发财发财")
}app.on('ready', createWindow);
<!DOCTYPE html>
<html><head><meta charset="UTF-8" /><title>Hello World!</title><link rel="stylesheet" href="index.css" /></head><body><h1>💖 Hello World!</h1><p>Welcome to your Electron application.</p><h1>Hello World!</h1>We are using Node.js <span id="node-version"></span>,Chromium <span id="chrome-version"></span>,and Electron <span id="electron-version"></span>.<!-- You can also require other files to run in this process --><!-- <script src="./renderer.js"></script> --></body><script>// 引用node中的函数require('path')// 高版本,渲染线程打开新窗口方法,需要在主进程打开// const {BrowserWindow} = require("@electron/remote")// const win = new BrowserWindow({//         width:500,//         height:500,//     })// win.loadURL("https://www.baidu.com")const { ipcRenderer } = require("electron");window.addEventListener('contextmenu', (e) => {e.preventDefault()// 渲染进程发送消息ipcRenderer.send('show-context-menu')})// 渲染进程接受主进程消息ipcRenderer.on('context-menu-command', (e, command) => {// ...})ipcRenderer.on('show-context-menu-reply', (e, command) => {console.log("开心",command)})ipcRenderer.on('mainMag', (e, command) => {console.log(e)console.log("------------")console.log(command)})</script>
</html>
http://www.dinnco.com/news/16613.html

相关文章:

  • 用java怎么做游戏下载网站电商平台怎么推广
  • 佛山网站建设外包vue seo优化
  • 网站开发资金规模正规微商免费推广软件
  • 宁波网站设计价格制作网站平台
  • wordpress微信拦截公司网站seo公司
  • 58同城百姓网seo知识是什么意思
  • 网站数据分析怎么做推广网站都有哪些
  • 关于学院网站建设的意见b2b平台网站
  • 集团网站群建设方案老哥们给个关键词
  • wordpress归档页面模板哈尔滨seo优化公司
  • 做变性手术视频网站手机网页制作app
  • .la域名做的网站百度推广做二级域名
  • aitt网站建设中seo如何优化关键词排名
  • 淘宝网站详情页怎么做优化网站找哪家
  • 三亚市住房与城乡建设局网站常用的网络营销方式
  • 刚做的婚恋网站怎么推广百度直播推广
  • wordpress短信回复合肥seo快排扣费
  • 西安高端网站建设首选企业网站定制开发
  • 廊坊自助建站模板文娱热搜榜
  • 有关毕业设计的网站合肥seo推广公司
  • 用护卫神做共享网站网络营销工具有哪些
  • php做网站csdn小程序开发教程
  • 网站设计专业毕业论文备案查询
  • 乌兰察布市建设工程造价网站新品推广活动方案
  • 简洁的网站设计长春刚刚最新消息今天
  • ui网站模板优化seo是什么
  • 做网站挣钱来个好心人指点一下呗手游推广去哪里找客源
  • 水果网页设计代码免费seo网站推广
  • 网站建设都有什么栏目目前最火的自媒体平台
  • 宁波甬晟园林建设有限公司网站百度快照是什么