Elm nicely abstracts over JS interoperability with a mechanism called ports: https://guide.elm-lang.org/interop/javascript.html