io.scalajs.dom.event.ServerSentEvents.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dom-html_sjs0.6_2.11 Show documentation
Show all versions of dom-html_sjs0.6_2.11 Show documentation
DOM/HTML bindings for Scala.js
package io.scalajs.dom.event
import scala.scalajs.js
/**
* Server-Sent Event
* @author [email protected]
*/
@js.native
trait ServerSentEvents extends js.Object {
/**
* The event occurs when an error occurs with the event source
*/
def onerror(callback: js.Function): Unit = js.native
/**
* The event occurs when a message is received through the event source
*/
def onmessage(callback: js.Function): Unit = js.native
/**
* The event occurs when a connection with the event source is opened
*/
def onopen(callback: js.Function): Unit = js.native
}