remote:在Electron中将JavaScript对象从主进程桥接到渲染器进程

时间:2024-05-20 08:54:51
【文件属性】:

文件名称:remote:在Electron中将JavaScript对象从主进程桥接到渲染器进程

文件大小:131KB

文件格式:ZIP

更新时间:2024-05-20 08:54:51

TypeScript

@电子/远程 @electron/remote是一个模块,用于将JavaScript对象从主进程桥接到渲染器进程。 这使您可以访问仅主进程对象,就好像它们在渲染器进程中可用一样。 :warning: 警告! 这个模块有。 比起使用此模块,几乎总是有更好的方法来完成您的任务。 例如, 可以服务于许多常见的用例。 @electron/remote替代了Electron中的内置remote模块,该模块已被弃用,最终将被移除。 从remote迁移 注意: @electron/remote需要Electron 10或更高版本。 从内置的remote模块迁移到@electron/remote需要做三件事。 首先,您需要从NPM安装它: $ npm install --save @electron/remote 其次, @electron/remote/main必须在主进程中初始化,然后才能在渲染器中使


【文件预览】:
remote-master
----.gitignore(20B)
----package.json(1KB)
----renderer()
--------index.js(49B)
----src()
--------renderer()
--------main()
--------common()
--------internal-ambient.d.ts(715B)
----tsconfig.json(301B)
----README.md(12KB)
----main()
--------index.js(45B)
----.releaserc.json(190B)
----.circleci()
--------mocha-reporter-config.json(142B)
--------config.yml(1KB)
----test()
--------all.ts(39KB)
--------events-helpers.ts(2KB)
--------index.js(238B)
--------window-helpers.ts(1KB)
--------fixtures()
----yarn.lock(227KB)
----index.d.ts(1KB)

网友评论