public class JsEventSource extends JsElementalMixinBase implements EventSource
CLOSED, CONNECTING, OPEN
SVG_ZOOMANDPAN_DISABLE, SVG_ZOOMANDPAN_MAGNIFY, SVG_ZOOMANDPAN_UNKNOWN
Modifier | Constructor and Description |
---|---|
protected |
JsEventSource() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the connection, if any, and sets the
readyState attribute to CLOSED . |
EventListener |
getOnerror()
A JavaScript function to call when an error occurs.
|
EventListener |
getOnmessage()
A JavaScript function to call when an a message without an
event field arrives. |
EventListener |
getOnopen()
A JavaScript function to call when the connection has opened.
|
int |
getReadyState()
The state of the connection, must be one of
CONNECTING , OPEN , or CLOSED . |
String |
getUrl()
Read only.
|
String |
getURL() |
void |
setOnerror(EventListener listener) |
void |
setOnmessage(EventListener listener) |
void |
setOnopen(EventListener listener) |
addEventListener, addEventListener, beginElement, beginElementAt, dispatchEvent, endElement, endElementAt, getAnimatedClassName, getAnimatedHeight, getAnimatedHref, getAnimatedResult, getAnimatedTransform, getAnimatedWidth, getAnimatedX, getAnimatedY, getBBox, getChildElementCount, getCTM, getExternalResourcesRequired, getFarthestViewportElement, getFirstElementChild, getLastElementChild, getNearestViewportElement, getNextElementSibling, getPresentationAttribute, getPreserveAspectRatio, getPreviousElementSibling, getRequiredExtensions, getRequiredFeatures, getScreenCTM, getSvgStyle, getSystemLanguage, getTransformToElement, getViewBox, getXmllang, getXmlspace, getZoomAndPan, hasExtension, querySelector, querySelectorAll, removeEventListener, removeEventListener, setXmllang, setXmlspace, setZoomAndPan
at, at, intAt, intAt, length, numberAt, numberAt, setAt, setAt, setAt, setAt, setAt, setAt
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener
intAt, length
numberAt
public final String getURL()
getURL
in interface EventSource
public final EventListener getOnerror()
EventSource
getOnerror
in interface EventSource
public final void setOnerror(EventListener listener)
setOnerror
in interface EventSource
public final EventListener getOnmessage()
EventSource
event
field arrives.getOnmessage
in interface EventSource
public final void setOnmessage(EventListener listener)
setOnmessage
in interface EventSource
public final EventListener getOnopen()
EventSource
getOnopen
in interface EventSource
public final void setOnopen(EventListener listener)
setOnopen
in interface EventSource
public final int getReadyState()
EventSource
CONNECTING
, OPEN
, or CLOSED
. Read only.getReadyState
in interface EventSource
public final String getUrl()
EventSource
getUrl
in interface EventSource
public final void close()
EventSource
readyState
attribute to CLOSED
. If the connection is already closed, the method does nothing.close
in interface EventSource
Copyright © 2018. All rights reserved.