It's in the WhatWG standard, linked on that page: <a href="https://html.spec.whatwg.org/multipage/web-sockets.html#the-websocket-interface" rel="nofollow">https://html.spec.whatwg.org/multipage/web-sockets.html#the-...</a> under "The readyState attribute represents the state of the connection. It can have the following values:"
w3.org only mentions valid values of 0, 1 and 2? [0]<p>[0] <a href="https://www.w3.org/TR/2009/WD-websockets-20091222/#dom-websocket-readystate" rel="nofollow">https://www.w3.org/TR/2009/WD-websockets-20091222/#dom-webso...</a>