Skip to content

Generic error event for EventSource #832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api-reports/2_12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2157,7 +2157,7 @@ EventSource[JC] def addEventListener[T <: Event](`type`: String, listener: js.Fu
EventSource[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit
EventSource[JC] def close(): Unit
EventSource[JC] def dispatchEvent(evt: Event): Boolean
EventSource[JC] var onerror: js.Function1[ErrorEvent, _]
EventSource[JC] var onerror: js.Function1[Event, _]
EventSource[JC] var onmessage: js.Function1[MessageEvent, _]
EventSource[JC] var onopen: js.Function1[Event, _]
EventSource[JC] def readyState: Int
Expand Down
2 changes: 1 addition & 1 deletion api-reports/2_13.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2157,7 +2157,7 @@ EventSource[JC] def addEventListener[T <: Event](`type`: String, listener: js.Fu
EventSource[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit
EventSource[JC] def close(): Unit
EventSource[JC] def dispatchEvent(evt: Event): Boolean
EventSource[JC] var onerror: js.Function1[ErrorEvent, _]
EventSource[JC] var onerror: js.Function1[Event, _]
EventSource[JC] var onmessage: js.Function1[MessageEvent, _]
EventSource[JC] var onopen: js.Function1[Event, _]
EventSource[JC] def readyState: Int
Expand Down
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