Source code

Revision control

Copy as Markdown

Other Tools

<html><body>
Creating WebSocket
<script type="application/javascript">
onmessage = function(e) {
parent.postMessage(e.data, '*');
}
try{
let socket;
if (location.search == '?insecure') {
}
else {
}
socket.onerror = function() {
parent.postMessage('WS onerror', '*');
close();
};
socket.onopen = function() {
socket.close();
parent.postMessage('WS onopen', '*');
close();
};
} catch(e) {
if (e.name == 'SecurityError') {
parent.postMessage('SecurityError', '*');
} else {
parent.postMessage('WS Throws something else!', '*');
}
close();
}
</script>
</body></html>