on develop help sign in
Remove battery zapping syncPoints
commit4d34ef52159122df6791d3d0d5a022b648b929ac authorHamish Mackenzie <Hamish.K.Mackenzie@googlemail.com> dateSun 19 Feb 2017, 01:43 (10 years ago) parente86afbf
1 file changed+1−15
reflex-dom-core/src/Reflex/Dom/Main.hs+1−15
reflex-dom-core/src/Reflex/Dom/Main.hs+1−15
@@ -51,9 +51,6 @@ mainWidget w = withJSContextSingleton $ \jsSing -> do
5151 doc <- currentDocumentUnchecked
5252 body <- getBodyUnchecked doc
5353 attachWidget body jsSing w
54− forever $ do
55− liftIO $ threadDelay 100000
56− syncPoint
5754
5855--TODO: The x's should be unified here
5956{-# INLINABLE mainWidgetWithHead #-}
@@ -64,9 +61,6 @@ mainWidgetWithHead h b = withJSContextSingleton $ \jsSing -> do
6461 attachWidget headElement jsSing h
6562 body <- getBodyUnchecked doc
6663 attachWidget body jsSing b
67− forever $ do
68− liftIO $ threadDelay 100000
69− syncPoint
7064
7165{-# INLINABLE mainWidgetWithCss #-}
7266mainWidgetWithCss :: ByteString -> (forall x. Widget x ()) -> JSM ()
@@ -76,9 +70,6 @@ mainWidgetWithCss css w = withJSContextSingleton $ \jsSing -> do
7670 setInnerHTML headElement . Just $ "<style>" <> T.unpack (decodeUtf8 css) <> "</style>" --TODO: Fix this
7771 body <- getBodyUnchecked doc
7872 attachWidget body jsSing w
79− forever $ do
80− liftIO $ threadDelay 100000
81− syncPoint
8273
8374type Widget x = PostBuildT Spider (ImmediateDomBuilderT Spider (WithJSContextSingleton x (PerformEventT Spider (SpiderHost Global)))) --TODO: Make this more abstract --TODO: Put the WithJSContext underneath PerformEventT - I think this would perform better
8475
@@ -166,9 +157,6 @@ mainWidgetInElementById eid w = withJSContextSingleton $ \jsSing -> do
166157 doc <- currentDocumentUnchecked
167158 root <- getElementByIdUnchecked doc eid
168159 attachWidget root jsSing w
169− forever $ do
170− liftIO $ threadDelay 100000
171− syncPoint
172160
173161data AppInput t = AppInput
174162 { _appInput_window :: Window t
@@ -188,6 +176,4 @@ runApp' app = withJSContextSingleton $ \jsSing -> do
188176 app $ AppInput
189177 { _appInput_window = w
190178 }
191− forever $ do
192− liftIO $ threadDelay 100000
193− syncPoint
179+ return ()