fix: illegal access errors with nodeIntegrationInSubFrames (#29093)

This commit is contained in:
Shelley Vohr 2021-05-14 13:36:15 +02:00 committed by GitHub
parent 4073599f59
commit b7a23450b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 104 additions and 4 deletions

View file

@ -0,0 +1,29 @@
<html>
<body>
<iframe id="mainframe"></iframe>
<script>
const net = require('net');
const path = require('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>