module Miso.AFrame where
import Miso
foreign import javascript unsafe
"(function(){ document.body.innerHTML = ''; })();"
clearBody :: IO ()
startHtmlOnlyApp :: View action -> IO ()
startHtmlOnlyApp v = startApp App {..}
where
initialAction = ()
mountPoint = Nothing
model = ()
update = const noEff
view = const (() <$ v)
events = defaultEvents
subs = []
startHtmlAndJSApp :: View action -> IO () -> IO ()
startHtmlAndJSApp v js = startApp App {..}
where
initialAction = ()
mountPoint = Nothing
model = ()
update _ m = m <# js
view = const (() <$ v)
events = defaultEvents
subs = []
reloadAFrameApp :: IO () -> IO ()
reloadAFrameApp app = do
clearBody
app