Add the Scroll module.
This commit is contained in:
parent
89f306ed47
commit
fa988a2cca
15
src/Scroll.purs
Normal file
15
src/Scroll.purs
Normal file
@ -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"
|
Loading…
Reference in New Issue
Block a user