> For the complete documentation index, see [llms.txt](https://neurosell.gitbook.io/parallelix/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://neurosell.gitbook.io/parallelix/api-reference/pwa-and-web-applications.md).

# PWA and Web Applications

<figure><img src="/files/kEUWkOwWBx95zwxTI2Nx" alt=""><figcaption></figcaption></figure>

### What is Web application (PWA)

This is a **basic module that applies to all platforms**, except for those you have specified in the configuration of the [Parallelix](/parallelix/api-reference/general-client.md#general-client-api-reference-parallelix) object.

{% hint style="danger" %}
This module will always be loaded by default, so it must be available for the Parallelix client.\
[**See the General Client section for downloading paths**](/parallelix/api-reference/general-client.md).
{% endhint %}

For example, if the platforms you selected were **vk** and **telegram**, this module will be used outside these platforms.

**This module is support PWA methods.**

***

### Web Module (ParallelixWeb)

{% hint style="warning" %}
**Module Name:** "web" (default)
{% endhint %}

Any of our modules **inherits from** [ParallelixWrapper](/parallelix/api-reference/general-client.md#parallelixwrapper-class) - a virtual class describing a **unified SDK structure**.\
Below we have described the peculiarities of working with the module, as well as the differences and description of API parameters for the current module.

#### PlatformSpecificParameters

**These are parameters** that are passed inside some module methods. When working with them, you need to **create subobjects** as [described in the documentation on working with such parameters](/parallelix/api-reference/general-client.md#platformspecificparameters).\
Inside this subobject are the parameters described in the documentation of a particular platform.

**Below we have described each method available for calling, its parameters with a reference to the official documentation and the name of the official method.**

***

### **Platform Specific configuration**

| Field    | Type   | Description               |
| -------- | ------ | ------------------------- |
| manifest | string | Path to PWA manifest file |

### **API Reference**

| Method           | Description                                                                             | Parameters                                                                                                                                                                                              |
| ---------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| GetLaunchParams  | Get current browser search parameters (query)                                           | <p><strong>Returns in onSuccess:</strong></p><p>Key Value object with window arguments</p>                                                                                                              |
| HandleEvents     | Handle all "message" events from current window.                                        | -                                                                                                                                                                                                       |
| GetClientInfo    | Returns information about current browser and client                                    | <p><strong>Returns in onSuccess:</strong></p><p>Information about current clinet (version, platform, userAgent, userAgentData)</p>                                                                      |
| ToggleFullscreen | Toggle browser / pwa fullscreen mode                                                    | boolean state of fullscreen                                                                                                                                                                             |
| AddToHomeScreen  | Adding current PWA on home screen. Can't work without PWA manifest in your application. | onSuccess and onError callbacks.                                                                                                                                                                        |
| AddToFavorites   | Add current page to favourites in browser                                               | Parameters are empty. Has onSuccess and onError callbacks                                                                                                                                               |
| OpenLink         | Open link in new window                                                                 | url \[string]                                                                                                                                                                                           |
| GetStorage       | Get local storage item                                                                  | key \[string] key name                                                                                                                                                                                  |
| SetStorage       | Set local storage item                                                                  | <p>key \[string] key name</p><p>value \[dynamic] storage value</p>                                                                                                                                      |
| RequestLocation  | Request user geolocation                                                                | <p>Return an object in onSuccess with parameters from:</p><p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition">navigator.geolocation.getCurrentPosition</a></p> |
| CloseApplication | Close browser window / PWA                                                              | -                                                                                                                                                                                                       |
| GoBack           | Go to previous page / hash                                                              | <p>Wrapper of:</p><p>window\.history.back(); </p>                                                                                                                                                       |
