on develop help sign in
Reorder attachWidget arguments
commit750fb69e0aa11d9c96209a546c771f5637e71338 authorAli Abrar <aliabrar@gmail.com> dateWed 8 Apr 2015, 20:56 (12 years ago) parent63bf06c
1 file changed+6−6
src/Reflex/Dom/Internal.hs+6−6
src/Reflex/Dom/Internal.hs+6−6
@@ -167,15 +167,15 @@ mainWidget :: Widget Spider (Gui Spider SpiderHost (HostFrame Spider)) () -> IO
167167mainWidget w = runWebGUI $ \webView -> do
168168 Just doc <- liftM (fmap castToHTMLDocument) $ webViewGetDomDocument webView
169169 Just body <- documentGetBody doc
170− attachWidget body w webView
170+ attachWidget body webView w
171171
172172mainWidgetWithHead :: Widget Spider (Gui Spider SpiderHost (HostFrame Spider)) () -> Widget Spider (Gui Spider SpiderHost (HostFrame Spider)) () -> IO ()
173173mainWidgetWithHead h b = runWebGUI $ \webView -> do
174174 Just doc <- liftM (fmap castToHTMLDocument) $ webViewGetDomDocument webView
175175 Just headElement <- liftM (fmap castToHTMLElement) $ documentGetHead doc
176− attachWidget headElement h webView
176+ attachWidget headElement webView h
177177 Just body <- documentGetBody doc
178− attachWidget body b webView
178+ attachWidget body webView b
179179
180180mainWidgetWithCss :: ByteString -> Widget Spider (Gui Spider SpiderHost (HostFrame Spider)) () -> IO ()
181181mainWidgetWithCss css w = runWebGUI $ \webView -> do
@@ -183,10 +183,10 @@ mainWidgetWithCss css w = runWebGUI $ \webView -> do
183183 Just headElement <- liftM (fmap castToHTMLElement) $ documentGetHead doc
184184 htmlElementSetInnerHTML headElement $ "<style>" <> T.unpack (decodeUtf8 css) <> "</style>" --TODO: Fix this
185185 Just body <- documentGetBody doc
186− attachWidget body w webView
186+ attachWidget body webView w
187187
188−attachWidget :: (IsHTMLElement e) => e -> Widget Spider (Gui Spider SpiderHost (HostFrame Spider)) a -> WebView -> IO a
189−attachWidget rootElement w wv = runSpiderHost $ do --TODO: It seems to re-run this handler if the URL changes, even if it's only the fragment
188+attachWidget :: (IsHTMLElement e) => e -> WebView -> Widget Spider (Gui Spider SpiderHost (HostFrame Spider)) a -> IO a
189+attachWidget rootElement wv w = runSpiderHost $ do --TODO: It seems to re-run this handler if the URL changes, even if it's only the fragment
190190 Just doc <- liftM (fmap castToHTMLDocument) $ liftIO $ nodeGetOwnerDocument rootElement
191191 frames <- liftIO newChan
192192 rec let guiEnv = GuiEnv doc (writeChan frames . runSpiderHost) runWithActions wv :: GuiEnv Spider SpiderHost