diff --git a/src/Scroll.purs b/src/Scroll.purs new file mode 100644 index 0000000..80b3d19 --- /dev/null +++ b/src/Scroll.purs @@ -0,0 +1,15 @@ +module Scroll where + +import Prelude +import Effect (Effect) +import Effect.Console (log) +import Halogen as H +import Web.HTML (window) +import Web.HTML.Window (scroll) + +scrollToTop :: Effect Unit +scrollToTop = do + H.liftEffect do + w <- window + scroll 0 0 w + log "Scrolled to top of the page"