summaryrefslogtreecommitdiff
path: root/Miso/FFI/Document.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2019-11-23 16:38:47 -0800
committerBen Sima <ben@bsima.me>2019-11-23 16:45:05 -0800
commit294c8e19b136f06ca7fa1bb4e4d109e90e2bb033 (patch)
treed8f56bdfc0451f9ad33e4ae396204bd0ba171d4d /Miso/FFI/Document.hs
parenteb7e442d930bda88aac3c6aad0825b5aa4173e5e (diff)
Add Com.MusicMeetsComics
Diffstat (limited to 'Miso/FFI/Document.hs')
-rw-r--r--Miso/FFI/Document.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/Miso/FFI/Document.hs b/Miso/FFI/Document.hs
new file mode 100644
index 0000000..f3a7bef
--- /dev/null
+++ b/Miso/FFI/Document.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE NoImplicitPrelude #-}
+module Miso.FFI.Document where
+
+import GHCJS.Types
+import Protolude
+
+foreign import javascript unsafe "$r = document.getElementById($1);"
+ getElementById :: JSString -> IO JSVal
+
+foreign import javascript unsafe "$r = document.querySelector($1);"
+ querySelector :: JSString -> IO JSVal