Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Generic error event for EventSource
According to MDN the error of an EventSource is a generic Event instead of an ErrorEvent: https://developer.mozilla.org/en-US/docs/Web/API/EventSource/error_event
  • Loading branch information
cornerman authored Feb 1, 2024
commit 31925f2245d35ab9cbdf8fc57b98a53cb384ceb0
2 changes: 1 addition & 1 deletion dom/src/main/scala/org/scalajs/dom/EventSource.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class EventSource private[this] extends EventTarget {

var onmessage: js.Function1[MessageEvent, _] = js.native

var onerror: js.Function1[ErrorEvent, _] = js.native
var onerror: js.Function1[Event, _] = js.native

/** The close() method must abort any instances of the fetch algorithm started for this EventSource object, and must
* set the readyState attribute to CLOSED. W3C 2012
Expand Down