getService

returns a service available for Chat

object getService(string service);
servicestringthe service name
objectthe object with the service methods

Example

const backend = $$("ch").getService("backend");

Details

Services are major blocks of inner logic of the widget. Their methods can be called directly as well as customized.

Chat has access to the following services:

  • Local - working with client-side data;
  • Operations - synchronizes the backend data with the client data;
  • Upload - methods for uploading the avatars for chats;
  • Helpers - methods for view templates, dateFormats, etc;
  • Backend - sending requests to backend.
See also
Back to top