Class: EventSource

OC.EventSource(src, dataopt)

new EventSource(src, dataopt)

Create a new event source
Parameters:
Name Type Attributes Description
src string
data object <optional>
to be send as GET
Source:

Methods

close()

Closes this event source.
Source:

(private) fallBackCallBack(type, data)

Fallback callback for browsers that don't have the native EventSource object. Calls the registered listeners.
Parameters:
Name Type Description
type String event type
data Object received data
Source:

listen(type, callback)

Listen to a given type of events.
Parameters:
Name Type Description
type String event type
callback function event callback
Source: