MCPcopy Index your code
hub / github.com/coder/websocket / OnError

Method OnError

internal/wsjs/wsjs_js.go:93–95  ·  view source on GitHub ↗

OnError registers a function to be called when there is an error with the WebSocket.

(fn func(e js.Value))

Source from the content-addressed store, hash-verified

91// OnError registers a function to be called when there is an error
92// with the WebSocket.
93func (c WebSocket) OnError(fn func(e js.Value)) (remove func()) {
94 return c.addEventListener("error", fn)
95}
96
97// MessageEvent is the type passed to a message handler.
98type MessageEvent struct {

Callers 1

initMethod · 0.80

Calls 1

addEventListenerMethod · 0.95

Tested by

no test coverage detected