Open
Description
The following Widget consists of an aff action that takes some time and a button to cancel it.
I thought it would kill aff action if I pressed the cancel button while aff action was running, but it didn't stop even after cancel, and "done" was shown in the log.
Is this an intented behaviour?
testWidget :: forall a. Widget HTML a
testWidget = do
result <- orr
[ "canceled" <$ button [ onClick ] [ text "cancel" ]
, liftAff affAction
]
text result
where
-- long taking action
affAction = do
delay (Milliseconds 5000.0)
log "done"
pure "done"