Nadalvn
Nadalvn12mo 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.12mo 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
NDH12mo ago
Check the spelling of the id in tag. I mess that up often. Or char casing if spelling is correct.