Nadalvn
Nadalvn13mo ago

Uncaught TypeError: Cannot set properties of null (setting 'innerHTML')

Code: var bcb = new WebSocket('wss://stream.binance.com:9443/ws/bnbusdt@trade'); bcb.onmessage = (event) => { var BCBobject = JSON.parse(event.data) document.getElementById('bcbCrypto').innerHTML = BCBobject }
2 Replies
marvinh.
marvinh.13mo ago
Looks like on your web page there is no element with an id of bcbCrypto . Do you see such an element in the DOM?
NDH
NDH13mo ago
Check the spelling of the id in tag. I mess that up often. Or char casing if spelling is correct.