2700506af93a3f0f84b9ddc177bab3419bdcc5f7
1 const body
= document
.createElement('body')
2 const root
= document
.createElement('div')
3 document
.title
= "Strapp.io Host"
4 if ("WebSocket" in window
) {
5 const wsock
= new WebSocket("wss://" + _strapp_host
+ ":" + _strapp_port
)
7 console
.log("Strapped to wss://" + _strapp_host
+ ":" + _strapp_port
)
9 wsock
.onmessage
= (evt
) => {
10 console
.log("Incoming connection from " + evt
.data
)
11 console
.log("TODO: Open a socket to this client")
14 root
.appendChild(document
.createTextNode("Your browser does not support Strapp"))
16 body
.appendChild(root
)