标签:get rgba cti htm electron tps shel ESS type
html是在renderer进程。如果要调用主进程需要用remote
<input type="button" value="cache" onclick="getCache()"> <script> const { remote, ipcRenderer, shell } = require(‘electron‘); const win = remote.getCurrentWindow(); var getCache=()=>{ var size = win.webContents.session.getCacheSize(); }
const mainProcess = remote.require(‘./main.js‘); </script>
electron In action 示例很好:
https://github.com/electron-in-action
在 html 中调用 electron 的函数 主进程的函数 nodejs
标签:get rgba cti htm electron tps shel ESS type
原文地址:https://www.cnblogs.com/bigben0123/p/13862627.html