Versions in this module Expand all Collapse all v0 v0.27.1 Jul 30, 2020 Changes in this version + var ErrWSInInitContext = common.NewInitContextError("using websockets in the init context is not supported") + type Socket struct + func (s *Socket) Close(args ...goja.Value) + func (s *Socket) On(event string, handler goja.Value) + func (s *Socket) Ping() + func (s *Socket) Send(message string) + func (s *Socket) SetInterval(fn goja.Callable, intervalMs int) + func (s *Socket) SetTimeout(fn goja.Callable, timeoutMs int) + type WS struct + func New() *WS + func (*WS) Connect(ctx context.Context, url string, args ...goja.Value) (*WSHTTPResponse, error) + type WSHTTPResponse struct + Body string + Error string + Headers map[string]string + Status int + URL string