summaryrefslogtreecommitdiff
path: root/src/Utils.purs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utils.purs')
-rw-r--r--src/Utils.purs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Utils.purs b/src/Utils.purs
index 4755436..8c530ef 100644
--- a/src/Utils.purs
+++ b/src/Utils.purs
@@ -54,6 +54,9 @@ query q = do
Nothing -> liftEffect $ throw $ "could not find element matching query: " <> q
Just x -> pure x
+getId :: forall m. MonadEffect m => DOM.Element -> m String
+getId e = liftEffect $ DOM.El.id e
+
listen :: forall m. MonadEffect m => DOM.Element -> String -> (Ev.Event -> Effect Unit) -> m Unit
listen e ev f = do
l <- liftEffect $ Ev.Tar.eventListener f