Skip to content

Instantly share code, notes, and snippets.

@ghostoy
Last active December 27, 2021 23:51
Show Gist options
  • Save ghostoy/183649c64060b088a610ebc142fae3d2 to your computer and use it in GitHub Desktop.
Save ghostoy/183649c64060b088a610ebc142fae3d2 to your computer and use it in GitHub Desktop.
test nwjc
console.log('bar');
console.log('foo');
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<link rel="stylesheet" href="">
</head>
<body>
<button type="button" onclick="test()">Test</button>
<script>
function test() {
var bins = ['foo.bin', 'bar.bin'];
for(var i = 0; i < bins.length; i++) {
console.log(`evalNWBin(null, '${process.cwd() + '/' + bins[i]}')`)
nw.Window.get().evalNWBin(null, process.cwd() + '/'+ bins[i]);
}
}
test();
</script>
</body>
</html>
{
"name": "nwjc-test",
"main": "index.html",
"chromium-args": "--enable-logging=stderr"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment