(ws, reason)
| 17339 | var { collectASequenceOfCodePointsFast, removeHTTPWhitespace } = require_data_url(); |
| 17340 | function isConnecting(ws) { |
| 17341 | return ws[kReadyState] === states.CONNECTING; |
| 17342 | } |
| 17343 | function isEstablished(ws) { |
| 17344 | return ws[kReadyState] === states.OPEN; |
| 17345 | } |
| 17346 | function isClosing(ws) { |
| 17347 | return ws[kReadyState] === states.CLOSING; |
| 17348 | } |
| 17349 | function isClosed(ws) { |
| 17350 | return ws[kReadyState] === states.CLOSED; |
| 17351 | } |
| 17352 | function fireEvent(e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) { |
| 17353 | const event = eventFactory(e, eventInitDict); |
| 17354 | target.dispatchEvent(event); |
| 17355 | } |
| 17356 | function websocketMessageReceived(ws, type, data) { |
no test coverage detected