Hi Sara – I am trying to use WebSocket from the RNT article. I would like event.data to show on the screen instead of it picked up by JS. Is there a way for the browser HTML to show the event.data on the browser screen?
If JS has to pick it up, how can I direct JS to put the data on the screen as HTML or plain?
Where does console.log(event.data) go?
Thanks a lot,
Bernie
Hi.
I’m sorry for taking so long to get back to you.
For some reason, I wasn’t notified of your question….
You need JavaScript to get the data that comes from Websocket and place it on the HTML page.
Console.log() prints the content on the browser JavaScript console. To open the console in your browse, press CTRL+Shift+J.
I hope this helps and I’m sorry for the delay.
Regards,
Sara