> 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

This is the base module for running your web applications. It will be used if your web application has been run outside of your defined platforms (default).

<figure><img src="https://2201096477-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNexHc25zkh1RToWdskoj%2Fuploads%2FsSZSY5DClNhnZHpyZ3ix%2Fimage.png?alt=media&amp;token=8d5541c0-3cbd-4779-9f10-8c22b1383035" 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>                                                                                                                                                       |
