antony
antony2y 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.2y 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?
Fifth-Normal-Form
Check the spelling of the id in tag. I mess that up often. Or char casing if spelling is correct.