Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/417.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何模拟一个;点击";哈斯克尔事件_Javascript_Haskell_Jsdom_Ghcjs - Fatal编程技术网

Javascript 如何模拟一个;点击";哈斯克尔事件

Javascript 如何模拟一个;点击";哈斯克尔事件,javascript,haskell,jsdom,ghcjs,Javascript,Haskell,Jsdom,Ghcjs,我想在Haskell中单击一个按钮,我正在使用(可能我错了) 函数dispatchEvent。 我的代码如下: event <- (toJSVal "click" ) dispatchEvent_ (button_run :: HTMLButtonElement) (MouseEvent event ) event用于在您的HTMLButtonElement上触发单击事件我对jsaddle dom不太了解,但这不是您想要的吗?类型不匹配;我需要向dispatchE

我想在Haskell中单击一个按钮,我正在使用(可能我错了) 函数dispatchEvent。 我的代码如下:

event  <- (toJSVal "click" )
dispatchEvent_ (button_run :: HTMLButtonElement) (MouseEvent event  )

event用于在您的
HTMLButtonElement

上触发单击事件我对jsaddle dom不太了解,但这不是您想要的吗?类型不匹配;我需要向dispatchEvent传递类型为“isEvent”的内容;click具有不同的类型。是否需要
dispatchEvent
<代码>单击
本身模拟它,而不使用
调度事件
,不是吗?哦,当然,非常感谢;我看到的是错误的“点击”:,而我需要的“点击”是错误的。真的非常感谢。很高兴听到它起作用了!作为将来参考的答案。