1 Star 0 Fork 1.4K

2144/electron-egg

forked from dromara/electron-egg 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
preload.js 433 Bytes
一键复制 编辑 原始数据 按行查看 历史
gaoshuaixing 提交于 2020-11-02 16:40 . init
// All of the Node.js APIs are available in the preload process.
// It has the same sandbox as a Chrome extension.
window.addEventListener('DOMContentLoaded', () => {
const replaceText = (selector, text) => {
const element = document.getElementById(selector)
if (element) element.innerText = text
}
for (const type of ['chrome', 'node', 'electron']) {
replaceText(`${type}-version`, process.versions[type])
}
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/iamherer/electron-egg.git
git@gitee.com:iamherer/electron-egg.git
iamherer
electron-egg
electron-egg
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385