1 Star 0 Fork 3

nutony/electron-quick-start

forked from Jone/electron-quick-start 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
preload.js 433 Bytes
一键复制 编辑 原始数据 按行查看 历史
Jone 提交于 2021-03-11 23:15 . 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 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nutony/electron-quick-start.git
[email protected]:nutony/electron-quick-start.git
nutony
electron-quick-start
electron-quick-start
master

搜索帮助