@@ -76,8 +76,9 @@ type Widget x = PostBuildT Spider (ImmediateDomBuilderT Spider (WithWebView x (P
76attachWidget :: DOM.IsElement e => e -> WebViewSingleton x -> Widget x a -> IO a
76attachWidget :: DOM.IsElement e => e -> WebViewSingleton x -> Widget x a -> IO a
77attachWidget rootElement wv w = fst <$> attachWidget' rootElement wv w
77attachWidget rootElement wv w = fst <$> attachWidget' rootElement wv w
79+-- | Warning: `mainWidgetWithHead'` is provided only as performance tweak. It is expected to disappear in future releases.
79−mainWidgetWithHead' :: (forall x. (a -> Widget x b, b -> Widget x a)) -> IO ()
80+mainWidgetWithHead' :: (a -> Widget () b, b -> Widget () a) -> IO ()
80−mainWidgetWithHead' widgets = runWebGUI $ \webView -> withWebViewSingleton webView $ \wv -> fmap fst $ attachWidget'' $ \events -> do
81+mainWidgetWithHead' widgets = runWebGUI $ \webView -> withWebViewSingletonMono webView $ \wv -> fmap fst $ attachWidget'' $ \events -> do
81 let (headWidget, bodyWidget) = widgets
82 let (headWidget, bodyWidget) = widgets
82 Just doc <- liftIO $ fmap DOM.castToHTMLDocument <$> webViewGetDomDocument webView
83 Just doc <- liftIO $ fmap DOM.castToHTMLDocument <$> webViewGetDomDocument webView
83 Just headElement <- getHead doc
84 Just headElement <- getHead doc