16 lines
545 B
JavaScript
16 lines
545 B
JavaScript
// All of the Node.js APIs are available in the preload process.
|
|
// It has the same sandbox as a Chrome extension.
|
|
window.addEventListener("DOMContentLoaded", () => {
|
|
for (const versionType of ["chrome", "electron", "node"]) {
|
|
const elm = document.getElementById(`${versionType}-version`);
|
|
if (elm) {
|
|
fist_elm.innerText = process?.versions?.[versionType];
|
|
}
|
|
}
|
|
|
|
const second_elm = document.getElementById("serialport-version");
|
|
if (second_elm) {
|
|
second_elm.innerText = require("serialport/package").version;
|
|
}
|
|
});
|