scala-js/scala-js-dom

ERROR: Failed to construct 'MouseEvent': 1 argument required, but only 0 present.

Atry opened this issue · 1 comments

Atry commented
new org.scalajs.dom.MouseEvent
ERROR: Failed to construct 'MouseEvent': 1 argument required, but only 0 present.
TypeError: Failed to construct 'MouseEvent': 1 argument required, but only 0 present.
    at $c_LScalaFiddle$.eval [as init___] (eval at  (https://scalafiddle.io/resultframe?theme=light:46:37), :1146:3)
    at $m_LScalaFiddle$ (eval at  (https://scalafiddle.io/resultframe?theme=light:46:37), :1159:47)
    at eval (eval at  (https://scalafiddle.io/resultframe?theme=light:46:37), :2709:18)
    at eval (eval at  (https://scalafiddle.io/resultframe?theme=light:46:37), :2711:4)
    at https://scalafiddle.io/resultframe?theme=light:58:37

See https://scalafiddle.io/sf/RHx7XyA/0

In the example in
https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent
the constructor seems to be
MouseEvent(`type`: String, data: js.Any = js.native)