3 ms·
Depends on what you're doing. In some cases Elm.Native will take care of browser differences. In general, Elm's replacement for the concept of undefined is May
by rtfeldman 12y ago
Depends on what you're doing. In some cases Elm.Native will take care of browser differences.
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 http://elm-lang.org/edit/examples/Functional/Maybe.elm
- millstone 12y agoAfter 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.