diff options
Diffstat (limited to 'elm/Lib/Ffi.elm')
-rw-r--r-- | elm/Lib/Ffi.elm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/elm/Lib/Ffi.elm b/elm/Lib/Ffi.elm new file mode 100644 index 00000000..6a2a5364 --- /dev/null +++ b/elm/Lib/Ffi.elm @@ -0,0 +1,18 @@ +-- Elm 0.19: "We've removed all Native modules and plugged all XSS vectors, +-- it's now impossible to talk with Javascript other than with ports!" +-- Me: "Oh yeah? I'll just run sed over the generated Javascript!" + +-- This module is a hack to work around the lack of an FFI (Foreign Function +-- Interface) in Elm. The functions in this module are stubs, their +-- implementations are replaced by the Makefile with calls to +-- window.elmFfi_<name> and the actual implementations are in Ffi.js. +-- +-- 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) + +-- Set the innerHTML attribute of a node +innerHtml : String -> Attribute msg +innerHtml = always (title "") |