Skip to content

Commit

Permalink
Merge pull request #832 from cornerman/patch-1
Browse files Browse the repository at this point in the history
Generic error event for EventSource
  • Loading branch information
zetashift authored Mar 4, 2024
2 parents c1133e1 + d68dd23 commit aca3aa2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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

0 comments on commit aca3aa2

Please sign in to comment.