Re:Goodbye “undefined is not a function”
by millstone on Sunday February 22, 2015 @07:50PM
(#9091975)
After some research, it looks like my answer is that I can't call it unconditionally from Elm. Elm doesn't provide an easy way to access arbitrary JavaScript properties, and doesn't attempt to expose all of the functionality of the browser, but instead provides its own API.
In general, Elm's replacement for the concept of undefined is Maybe, and the compiler will tell you if you forgot to handle something properly:
http://elm-lang.org/edit/examples/Functional/Maybe.elm