Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EventSource

Hierarchy

  • EventSource

Index

Constructors

constructor

Properties

CLOSED

CLOSED: number

CONNECTING

CONNECTING: number

OPEN

OPEN: number

onerror

onerror: function

Type declaration

    • (evt: MessageEvent): any
    • Parameters

      • evt: MessageEvent

      Returns any

onmessage

onmessage: function

Type declaration

    • (evt: MessageEvent): any
    • Parameters

      • evt: MessageEvent

      Returns any

onopen

onopen: function

Type declaration

    • (evt: MessageEvent): any
    • Parameters

      • evt: MessageEvent

      Returns any

readyState

readyState: number

url

url: string

withCredentials

withCredentials: boolean

Static CLOSED

CLOSED: number

Static CONNECTING

CONNECTING: number

Static OPEN

OPEN: number

Methods

addEventListener

  • addEventListener(type: string, listener: EventListener): void
  • Parameters

    • type: string
    • listener: EventListener

    Returns void

close

  • close(): void
  • Returns void

dispatchEvent

  • dispatchEvent(evt: Event): boolean
  • Parameters

    • evt: Event

    Returns boolean

removeEventListener

  • removeEventListener(type: string, listener?: EventListener): void
  • Parameters

    • type: string
    • Optional listener: EventListener

    Returns void

Generated using TypeDoc