miso
Copyright(C) 2016-2025 David M. Johnson
LicenseBSD3-style (see the file LICENSE)
MaintainerDavid M. Johnson <code@dmj.io>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Miso.EventSource

Description

 
Synopsis

EventSource

connect Source #

Arguments

:: URL 
-> (EventSource -> action)

onOpen

-> (JSVal -> action)

onMessage

-> (JSVal -> action)

onError

-> Effect parent model action 

socketState :: WebSocket -> (SocketState -> action) -> Effect parent model action Source #

Retrieves current status of WebSocket

If the WebSocket identifier does not exist a CLOSED is returned.

Defaults

Types

type URL = MisoString Source #

URL that the Websocket will connect to