Created
November 14, 2021 09:50
-
-
Save modster/7e3185599a3012b2b3be4c59ebb1d67c to your computer and use it in GitHub Desktop.
Electron preload process
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// All of the Node.js APIs are available in the preload process. | |
// It has the same sandbox as a Chrome extension. | |
// The process.versions property returns an object listing the version | |
// strings of Node.js and its dependencies. process.versions.modules | |
// indicates the current ABI version, which is increased whenever a | |
// C++ API changes. Node.js will refuse to load modules that were compiled | |
// against a different module ABI version. | |
const { versions } = require('process') | |
window.addEventListener('DOMContentLoaded', () => { | |
console.log(versions) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment