19 lines
448 B
JavaScript
19 lines
448 B
JavaScript
const information = document.getElementById('info')
|
|
const responseElement = document.getElementById('response')
|
|
|
|
if (information) {
|
|
const { versions } = window || {}
|
|
information.innerText = `Node.js: ${versions.node()}\nChrome: ${versions.chrome()}\nElectron: ${versions.electron()}`
|
|
}
|
|
|
|
const func = async () => {
|
|
const response = await window.versions.ping()
|
|
if (responseElement) {
|
|
responseElement.innerText = response
|
|
}
|
|
}
|
|
|
|
func()
|
|
|
|
|