elm-lang/dom/1.1.1

NOTE: this package is not compatible with Elm 0.19.1

Dom.LowLevel

This is not for general use. It backs libraries like elm-lang/mouse and elm-lang/window which should cover your needs in most cases. In the rare case that those packages do not seem to cover your scenario, first bring it up with the community. Ask around and learn stuff first! Only get into these functions after that.

Global Event Listeners

onDocument : String -> Decoder msg -> (msg -> Task Never ()) -> Task Never Never

Add an event handler on the document. The resulting task will never end, and when you kill the process it is on, it will detach the relevant JavaScript event listener.

onWindow : String -> Decoder msg -> (msg -> Task Never ()) -> Task Never Never

Add an event handler on window. The resulting task will never end, and when you kill the process it is on, it will detach the relevant JavaScript event listener.