electron/spec/fixtures/api/native-window-open-native-addon.html
2017-07-13 08:36:58 -07:00

22 lines
422 B
HTML

<html>
<body>
<script type="text/javascript" charset="utf-8">
const {ipcRenderer} = require('electron')
let runas
let requireError
try {
runas = require('runas')
} catch (error) {
requireError = error
}
if (requireError != null) {
ipcRenderer.send('answer', `Require runas failed: ${requireError.message}`)
} else {
ipcRenderer.send('answer', typeof runas)
}
</script>
</body>
</html>