SA_ConnectionStatusDetector Class
This component is responsible to detect if the browser is online or offline.
Constructor
SA_ConnectionStatusDetector
-
core
Parameters:
-
core
CoreThe main engine.
Item Index
Methods
Methods
_offline
()
private
Handler used by the checkOnline
method to send a wnp.standalone.connectionChanged
event.
_online
()
private
Handler used by the checkOnline
method to send a wnp.standalone.connectionChanged
event.
_onOfflineHandler
()
private
Handler called when the browser status is set to offline
from its menu.
_onOnlineHandler
()
private
Handler called when the browser status is set to online
from its menu.
checkOnline
()
Check if the browser is online or offline by sending an Ajax request.
If the browser is online then a wnp.standalone.online
event is triggered.
Otherwise a wnp.standalone.offline
event is triggered.
destroy
()
Destroy the component.
disable
()
enable
()
getTargeted
-
vector
Parameters:
-
vector
VectorA position, usually the cursor's one.
Returns:
The targeted element, or null if nothing is found.
initialize
()
Initialize the component.
onContextChanged
-
context
Parameters:
-
context
StringThe new context
startListening
()
stopListening
()
update
()
Update the the component. The internal timer is updated and a check is done if needed.