electron/spec/fixtures/crash-cases/js-execute-iframe/index.html
Milan Burda d78f37ec8f
refactor: use node scheme imports in spec (#38487)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-06-15 10:42:27 -04:00

29 lines
No EOL
738 B
HTML

<html>
<body>
<iframe id="mainframe"></iframe>
<script>
const net = require('node:net');
const path = require('node:path');
document.getElementById("mainframe").src="./page2.html";
const p = process.platform === 'win32'
? path.join('\\\\?\\pipe', process.cwd(), 'myctl')
: '/tmp/echo.sock';
const client = net.createConnection({ path: p }, () => {
console.log('connected to server');
client.write('world!\r\n');
});
client.on('data', (data) => {
console.log(data.toString());
client.end();
});
client.on('end', () => {
console.log('disconnected from server');
});
</script>
</body>
</html>