@@ -158,17 +158,15 @@ widgetHoldInternal child0 newChild = do
158 addVoidAction $ switch childVoidAction --TODO: Should this be a switchPromptly?
158 addVoidAction $ switch childVoidAction --TODO: Should this be a switchPromptly?
159 doc <- askDocument
159 doc <- askDocument
160 runWidget <- getRunWidget
160 runWidget <- getRunWidget
162− Just df <- createDocumentFragment doc
163− (result, postBuild, voidActions) <- runWidget df c
164− runFrameWithTriggerRef newChildBuiltTriggerRef (result, voidActions)
166− mp' <- getParentNode endPlaceholder
167− forM_ mp' $ \p' -> insertBefore p' (Just df) (Just endPlaceholder)
169 addVoidAction $ ffor newChild $ \c -> do
161 addVoidAction $ ffor newChild $ \c -> do
162+ Just df <- createDocumentFragment doc
163+ (result, postBuild, voidActions) <- runWidget df c
164+ runFrameWithTriggerRef newChildBuiltTriggerRef (result, voidActions)
170 liftIO $ deleteBetweenExclusive startPlaceholder endPlaceholder
166 liftIO $ deleteBetweenExclusive startPlaceholder endPlaceholder
171− build c
167+ mp' <- getParentNode endPlaceholder
168+ forM_ mp' $ \p' -> insertBefore p' (Just df) (Just endPlaceholder)
172 return (result0, fmap fst newChildBuilt)
170 return (result0, fmap fst newChildBuilt)
174diffMapNoEq :: (Ord k) => Map k v -> Map k v -> Map k (Maybe v)
172diffMapNoEq :: (Ord k) => Map k v -> Map k v -> Map k (Maybe v)