If I examine the close event object in Javascript console, close reason is empty on the event object, like this:
close { target: WebSocket, isTrusted: true, wasClean: true, code: 1001, reason: "", srcElement: WebSocket, currentTarget: WebSocket, eventPhase: 2, bubbles: false, cancelable: false, … }
I would like to catch the reason in my web app, for displaying different UI states. For now the code/number will work, but I'm wondering why can't I get the reason text!?