---
title: "Parent Manager Class"
description: "Provides methods for managing the parent application window in Bitrix24, including resizing the window, managing scroll, initiating calls, and opening the messenger."
canonical_url: "https://bitrix24.github.io/b24jssdk/docs/working-with-the-rest-api/frame-parent"
last_updated: "2026-05-08"
---
# Parent Manager Class

> Provides methods for managing the parent application window in Bitrix24, including resizing the window, managing scroll, initiating calls, and opening the messenger.

> [!WARNING]
> We are still updating this page. Some data may be missing here — we will complete it shortly.

```ts
// ... /////
$b24 = await initializeB24Frame()
// ... /////
await $b24.parent.fitWindow()
```

## Methods

### closeApplication

```ts
async closeApplication(): Promise<void>
```

Closes the application slider.

### fitWindow

```ts
async fitWindow(): Promise<any>
```

Sets the application frame size according to its content size.

### resizeWindow

```ts
async resizeWindow(width: number, height: number): Promise<void>
```

Resizes the application frame to the specified width and height.

### resizeWindowAuto

```ts
async resizeWindowAuto(
    appNode: null | HTMLElement = null,
    minHeight: number = 0,
    minWidth: number = 0
): Promise<void>
```

Automatically resizes the `document.body` of the application frame according to its content size.

| Parameter | Type | Description |
| --- | --- | --- |
| `appNode` | `null|HTMLElement` | Application node for height calculation. |
| `minHeight` | `number` | Minimum height. |
| `minWidth` | `number` | Minimum width. |

### getScrollSize

```ts
getScrollSize(): { scrollWidth: number, scrollHeight: number }
```

Returns the internal dimensions of the application frame.

### scrollParentWindow

```ts
async scrollParentWindow(scroll: number): Promise<void>
```

Scrolls the parent window to the specified position.

### reloadWindow

```ts
async reloadWindow(): Promise<void>
```

Reloads the application page.

### setTitle

```ts
async setTitle(title: string): Promise<void>
```

Sets the page title.

### imCallTo

```ts
async imCallTo(userId: number, isVideo: boolean = true): Promise<void>
```

Initiates a call through internal communication.

| Parameter | Type | Description |
| --- | --- | --- |
| `userId` | `number` | User identifier. |
| `isVideo` | `boolean` | `true` for video call, `false` for audio call. |

### imPhoneTo

```ts
async imPhoneTo(phone: string): Promise<void>
```

Makes a call to the specified phone number.

| Parameter | Type | Description |
| --- | --- | --- |
| `phone` | `string` | Phone number. |

### imOpenMessenger

```ts
async imOpenMessenger(dialogId: number|'chat${number}'|'sg${number}'|'imol|${number}'|undefined): Promise<void>
```

Opens the messenger window.

| Parameter | Type | Description |
| --- | --- | --- |
| `dialogId` | `number|chat${number}|sg${number}|imol|${number}|undefined` | Dialog identifier. |

### imOpenHistory

```ts
async imOpenHistory(dialogId: number|'chat${number}'|'imol|${number}'): Promise<void>
```

Opens the message history window.

| Parameter | Type | Description |
| --- | --- | --- |
| `dialogId` | `number|chat${number}|imol|${number}` | Dialog identifier. |

## Examples

### Try call

```ts [frame-parent-call.ts]
? visitAndReplace ?
```

## Sitemap

See the full [sitemap](/b24jssdk/sitemap.md) for all pages.
