summaryrefslogtreecommitdiff
path: root/elm/Lib/Ffi.elm
diff options
context:
space:
mode:
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