# Browser

GramJS can be easily converted to something you can use in a browser with [webpack](https://www.npmjs.com/package/webpack).&#x20;

at the time of writing this, the supported [webpack ](https://www.npmjs.com/package/webpack)versions are&#x20;

```
webpack 5.21.2
webpack-cli 4.5.0
```

To create the file simply call `webpack` in the root folder and a new folder called `browser` would be created in which you'll find the `gramjs.js` file that you can use.&#x20;

a simple usage example would be like so

```markup
<script src="./browser/gramjs.js"></script>
<script>

const { TelegramClient } = gramjs
const { StringSession } = gramjs.sessions
const client = new TelegramClient(new StringSession(''), apiId, apiHash, {
    connectionRetries: 3,
})
</script>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://painor.gitbook.io/gramjs/getting-started/browser.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
