summaryrefslogtreecommitdiff
path: root/elm/Lib/Ffi.elm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-10-28 10:54:15 +0100
committerYorhel <git@yorhel.nl>2019-11-10 12:44:55 +0100
commitdc243fb2d89c69611e3c2a154749c14643a69db0 (patch)
treeea63ed1fcb0fa1403781ca60f5344e17d965a671 /elm/Lib/Ffi.elm
parent279c4c9f82b45863f91a16867e4830695de7e0ce (diff)
ulist: Inline editable votes
Diffstat (limited to 'elm/Lib/Ffi.elm')
-rw-r--r--elm/Lib/Ffi.elm14
1 files changed, 10 insertions, 4 deletions
diff --git a/elm/Lib/Ffi.elm b/elm/Lib/Ffi.elm
index 1df0c50f..9c3b1c23 100644
--- a/elm/Lib/Ffi.elm
+++ b/elm/Lib/Ffi.elm
@@ -10,9 +10,15 @@
-- Use sparingly, all of this will likely break in future Elm versions.
module Lib.Ffi exposing (..)
-import Html exposing (Attribute)
-import Html.Attributes exposing (title)
+import Html
+import Html.Attributes
+import Browser.Dom
+import Task
-- Set the innerHTML attribute of a node
-innerHtml : String -> Attribute msg
-innerHtml = always (title "")
+innerHtml : String -> Html.Attribute msg
+innerHtml s = Html.Attributes.title ""
+
+-- Like Browser.Dom.focus, except it can call any function (without arguments)
+elemCall : String -> String -> Task.Task Browser.Dom.Error ()
+elemCall s = Browser.Dom.focus