new StatusWidget(attachToBorder, distance, fromTop, initialDisplay)
Creates an object to be used to listen to events from a
LightstreamerClient instance.
The new object will create a small visual widget to display the status of
the connection.
The created widget will have a fixed position so that it will not move
when the page is scrolled.
Parameters:
Name | Type | Description |
---|---|---|
attachToBorder |
String | "left" "right" or "no" to specify if the generated widget should be attached to the left border, right border or should not be attached to any border. In the latter case, it should be immediately positioned manually, by acting on the DOM element obtained through StatusWidget#getDomNode. |
distance |
String | The distance of the widget from the top/bottom (depending on the fromTop parameter). The specified distance must also contain the units to be used: all and only the units supported by CSS are accepted. |
fromTop |
boolean | true or false to specify if the distance is related to the top or to the bottom of the page. |
initialDisplay |
String | "open" "closed" or "dyna" to specify if the generated widget should be initialized open, closed or, in the "dyna" case, open and then immediately closed. By default "dyna" is used. If attachToBorder is set to "no" then this setting has no effects. |
Throws:
-
if an invalid value was passed as attachToBorder parameter.
Extends
Method Summary
- getDomNode
- Inquiry method that gets the DOM element that makes the widget container.
Inherited Methods
Method Detail
-
getDomNode() → {DOMElement}
-
Inquiry method that gets the DOM element that makes the widget container. It may be necessary to extract it to specify some extra styles or to position it in case "no" was specified as the attachToBorder constructor parameter.
Returns:
The widget DOM element.- Type
- DOMElement