Websocket API bindings



I have just made some basic bindings for vanilla browser Websockets (no library, no nothing), as it seemed to be missing. There are socket.io or ws library abstraction bindings but no vanilla Websocket API. At least I couldn’t find one that doesn’t rely on any lib.

I would appreciate critique and some help if you think it’s wrong. I am new to Reasonml/BS.