Skip to content

Event handler removal fails. #6

Open
@cliffordbeshers

Description

The following program should do nothing when the text is clicked, but the Ugh message appears anyway.

{-# LANGUAGE OverloadedStrings #-}

import Control.Monad (void)
import Data.Default
import Data.Text (Text)
import JavaScript.JQuery

default (Text)

main = do
body <- select "body"
button <- select "

Should do nothing when clicked.
"
response <- select "
Ugh, it did something.
"
appendJQuery button body
detach <- click (\e -> void $ appendJQuery response body) def button
detach
return ()

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions