@@ -352,6 +352,13 @@ elClass tag c child = elAttr tag ("class" =: c) child
352352
353353list dm mkChild = listWithKey dm (\_ dv -> mkChild dv)
354354
355+elDynHtml' :: MonadWidget t m => String -> Dynamic t String -> m (El t)
356+elDynHtml' elementTag html = do
357+ e <- buildEmptyElement elementTag (Map.empty :: Map String String)
358+ schedulePostBuild $ liftIO . htmlElementSetInnerHTML e =<< sample (current html)
359+ addVoidAction $ fmap (liftIO . htmlElementSetInnerHTML e) $ updated html
360+ wrapElement e
361+
355362{-
356363
357364--TODO: Update dynamically
@@ -434,4 +441,9 @@ tabDisplay ulClass activeClass tabItems = do
434441 a <- link x
435442 return $ fmap (const k) (_link_clicked a)
436443
437−
444+-- | Place an element into the DOM and wrap it with Reflex event handlers. Note: undefined behavior may result if the element is placed multiple times, removed from the DOM after being placed, or in other situations. Don't use this unless you understand the internals of MonadWidget.
445+unsafePlaceElement :: MonadWidget t m => HTMLElement -> m (El t)
446+unsafePlaceElement e = do
447+ p <- askParent
448+ liftIO $ nodeAppendChild p $ Just e
449+ wrapElement e