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

男女做那个是的视频网站wordpress自动锚文本

男女做那个是的视频网站,wordpress自动锚文本,网站备案照相,有关做聚合物电池公司的网站文章目录 渲染进程到主进程#xff08;单向#xff09;渲染进程到主进程#xff08;双向#xff09;主进程到渲染进程 #xff08;单向#xff0c;可模拟双向#xff09; 渲染进程到主进程#xff08;单向#xff09; send #xff08;render 发送#xff09;on 单向渲染进程到主进程双向主进程到渲染进程 单向可模拟双向 渲染进程到主进程单向 send render 发送on main 监听 // main.js 主要代码// electron/main includes types for all main process modules. const { app, ipcMain } require(electron/main) app.whenReady().then((){// 需要在 HTML 文件加载之前监听保证从渲染器调用之前处理程序能够准备就绪。ipcMain.on(set-title, (event, title) {const webContents event.senderconst win BrowserWindow.fromWebContents(webContents)win.setTitle(title)})createWindow(); // 创建窗口 })// preload.js // electron/renderer includes types for all renderer process modules. const { contextBridge, ipcRenderer } require(electron/renderer) contextBridge.exposeInMainWorld(electronAPI, (){setTitle: (title) ipcRenderer.send(set-title,title) })// renderer.js// 插入html中的js, 运行于渲染程序中 const setButton document.getElementById(btn) const titleInput document.getElementById(title) setButton.addEventListener(click, () {const title titleInput.valuewindow.electronAPI.setTitle(title) })渲染进程到主进程双向 invokerender 发送handlemain 监听 const { app, ipcMain, dialog } require(electron/main) app.whenReady().then((){// 需要在 HTML 文件加载之前监听保证从渲染器调用之前处理程序能够准备就绪。// IPC 通道名称上的 dialog: 前缀对代码没有影响。 它仅用作命名空间以帮助提高代码的可读性。ipcMain.handle(dialog:openFile, async () {const { canceled, filePaths } await dialog.showOpenDialog()if(!canceled) return filePaths[0]})createWindow(); // 创建窗口 })// preload.js // electron/renderer includes types for all renderer process modules. const { contextBridge, ipcRenderer } require(electron/renderer) contextBridge.exposeInMainWorld(electronAPI, (){openFile: () ipcRenderer.invoke(dialog:openFile) })// renderer.js// 插入html中的js, 运行于渲染程序中 const setButton document.getElementById(btn) const filePath document.getElementById(filePath) setButton.addEventListener(click, async () {const path await window.electronAPI.openFile()filePath.innerText path })主进程到渲染进程 单向可模拟双向 send on // main.jsconst { app, BrowserWindow, Menu, ipcMain } require(electron/main) const path require(node:path)function createWindow () {const mainWindow new BrowserWindow({webPreferences: {preload: path.join(__dirname, preload.js)}})const menu Menu.buildFromTemplate([{label: app.name,submenu: [{// 使用 webContents.send API 将 IPC 消息从主进程发送到目标渲染器。// 其使用方式与 ipcRenderer.send 相同。click: () mainWindow.webContents.send(update-counter, 1),label: Increment},{click: () mainWindow.webContents.send(update-counter, -1),label: Decrement}]}])Menu.setApplicationMenu(menu)mainWindow.loadFile(index.html) }app.whenReady().then(() {// 模拟双向通信接收渲染进程发送的数据update-counter 触发ipcMain.on(counter-value, (_event, value) {console.log(value) })createWindow() })// preload.jsconst { contextBridge, ipcRenderer } require(electron/renderer) contextBridge.exposeInMainWorld(electronAPI, {onUpdateCounter: (callback) ipcRenderer.on(update-counter, (event,value) callback(value)),sendCount: (value) ipcRender.send(counter-value, value) })// render.js const count document.getElementById(count) window.electronAPI.onUpdateCounter((value){const newValue Number(count.innerText) value;count.innerText newValue.toString();window.electronAPI.sendCount(newValue) })
http://www.hkea.cn/news/14517911/

相关文章:

  • php网站开发代码十堰哪里有做网站的
  • 石家庄网站建设今天改网名百度快速优化推广
  • 天津网站建设案例教程海阔淘宝客助手wordpress演示站 | 紫色清新商城模板
  • 昆明城乡建设局网站济南富新网站建设
  • 个人网站免费源码大全抖音头条是seo推广还是sem
  • 做网站流程图小程序制作方案
  • 建好网站后如何向里面加东西做推广的技巧
  • pc网站优势合肥网站建设技术外包
  • 使用ftp软件连接到网站空间网站开发工具链接服务器
  • 网站开发人员 把网站注销深圳高端营销网站
  • 国外常用的seo站长工具docker安装wordpress
  • 有没有直接做网站的软件建筑工程网站搭建
  • 免费手机端网站模板房产中介网站建设技巧
  • 旅游网站设计策划书横岗做网站
  • 网站前端包括哪些现在自己做网站卖东西行么
  • vue做电商网站域名注册成功后怎么使用网站
  • 广州智能建站网站接入网方式
  • 永久一级传奇网站长治哪家公司做网站好
  • 国外h5网站模板wordpress国外插件速度慢
  • 商城网站建设咨询网站建设 铭阳传媒
  • 有哪些好的做网站公司网上商城系统软件
  • 贵阳网站建设哪家网页设计与制作教程 机械工业出版社
  • 阿里云做网站需要些什么软件上海英文网站制作
  • 余姚网站定制用电脑做服务器搭建php网站
  • 东莞网站设计方案配置网站域名
  • 大型网站建设机构wordpress存档显示文章所有内容
  • 金溪网站建设制作网站开发软件著作权归谁
  • 手机网站建设服务哪家好wordpress 转义
  • 成都科技网站建设找网站内容发布平台源码
  • 摄影作品网站app十大排名安卓搭载wordpress