on develop help sign in
Add elDynHtmlAttr'
commit300f8938ce815447d3e88342874b8ef68bc39160 authorDoug Beardsley <mightybyte@gmail.com> dateFri 13 Mar 2015, 17:54 (12 years ago) parentd6a1c77
1 file changed+7
src/Reflex/Dom/Widget/Basic.hs+7
src/Reflex/Dom/Widget/Basic.hs+7
@@ -433,6 +433,13 @@ elDynHtml' elementTag html = do
433433 addVoidAction $ fmap (liftIO . htmlElementSetInnerHTML e) $ updated html
434434 wrapElement e
435435
436+elDynHtmlAttr' :: MonadWidget t m => String -> Map String String -> Dynamic t String -> m (El t)
437+elDynHtmlAttr' elementTag attrs html = do
438+ e <- buildEmptyElement elementTag attrs
439+ schedulePostBuild $ liftIO . htmlElementSetInnerHTML e =<< sample (current html)
440+ addVoidAction $ fmap (liftIO . htmlElementSetInnerHTML e) $ updated html
441+ wrapElement e
442+
436443{-
437444
438445--TODO: Update dynamically