If you want to know the technical details: there's this technology called WebRTC which the web port requires to do netgaming. Normal SRB2 uses a technology for netgaming called UDP.
WebRTC and UDP are not compatible out-of-the-box. However, if you wanted to, you could rig up WebRTC so that SRB2's netcode would understand it.
It just takes a lot of work because you have to build the rig on both normal SRB2 and web SRB2. So you would write a lot of new code in both C and JavaScript. As the maintainer of web SRB2, I can't commit to that at this time... sorry!