{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE CPP #-}
module Miso.EventSource
(
connect
, close
, socketState
, emptyEventSource
, EventSource (..)
, URL
) where
import Miso.Effect
import Miso.Runtime
import Language.Javascript.JSaddle
connect
:: URL
-> (EventSource -> action)
-> (JSVal -> action)
-> (JSVal -> action)
-> Effect parent model action
connect :: forall action parent model.
URL
-> (EventSource -> action)
-> (JSVal -> action)
-> (JSVal -> action)
-> Effect parent model action
connect = URL
-> (EventSource -> action)
-> (JSVal -> action)
-> (JSVal -> action)
-> Effect parent model action
forall action parent model.
URL
-> (EventSource -> action)
-> (JSVal -> action)
-> (JSVal -> action)
-> Effect parent model action
eventSourceConnect
close
:: EventSource
-> Effect parent model action
close :: forall parent model action.
EventSource -> Effect parent model action
close = EventSource -> Effect parent model action
forall parent model action.
EventSource -> Effect parent model action
eventSourceClose