Skip to content

Instantly share code, notes, and snippets.

@luigy
Created June 22, 2017 23:19
Show Gist options
  • Save luigy/2e1355035f01f9442cb66a3c1c696f70 to your computer and use it in GitHub Desktop.
Save luigy/2e1355035f01f9442cb66a3c1c696f70 to your computer and use it in GitHub Desktop.
different behavior with ghcjs vs ghc(jsaddle-warp)
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad
import Reflex.Dom
main :: IO ()
main = run $ mainWidget' $ do
(outer, inner) <- el' "div" $ do
fmap leftmost $ forM ["FOO", "BAR"] $ \l -> do
elStopPropagationNS Nothing "div" Click $ do
click <- button l
return $ l <$ click
dynText <=< holdDyn "" $ leftmost ["OUTER" <$ domEvent Click outer, inner]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment