2023-11-26 20:00:43 +08:00

50 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<input id="file1" type="file" nwdirectory="true" />
<script>
console.log('input test')
function selectChange(e) {
console.log('change:', e)
}
function selectCancel(e) {
console.log('selectCancel:', e)
}
const file = document.getElementById('file1')
file.addEventListener('change', selectChange)
file.addEventListener('cancel', selectCancel)
</script>
<h1>Hello World!</h1>
We are using node.js 9999
<script>
document.write(process.version)
console.log(123)
var os = require('os');
var pty = require('node-pty');
var shell = os.platform() === 'win32' ? 'powershell.exe' : 'bash';
console.log(456)
var ptyProcess = pty.spawn(shell, [], {
name: 'xterm-color',
cols: 80,
rows: 30,
cwd: process.env.HOME,
env: process.env
});
ptyProcess.onData(function(data) {
process.stdout.write(data);
});
ptyProcess.write('ls\r');
ptyProcess.resize(100, 40);
ptyProcess.write('ls\r');
</script>.
<script scr=index.js></script>
</body>
</html>