// ... /////
$b24 = await initializeB24Frame()
// ... /////
await $b24.parent.fitWindow()
Methods
closeApplication
async closeApplication(): Promise<void>
Closes the application slider.
fitWindow
async fitWindow(): Promise<any>
Sets the application frame size according to its content size.
resizeWindow
async resizeWindow(width: number, height: number): Promise<void>
Resizes the application frame to the specified width and height.
resizeWindowAuto
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.
getScrollSize
getScrollSize(): { scrollWidth: number, scrollHeight: number }
Returns the internal dimensions of the application frame.
scrollParentWindow
async scrollParentWindow(scroll: number): Promise<void>
Scrolls the parent window to the specified position.
reloadWindow
async reloadWindow(): Promise<void>
Reloads the application page.
setTitle
async setTitle(title: string): Promise<void>
Sets the application page title — the in-layout heading element (#pagetitle) that Bitrix24 renders around your app. It does not change the browser tab title.
The portal handles this command with BX.ajax.UpdatePageTitle(), which rewrites the #pagetitle element. It never calls BX.ajax.UpdateWindowTitle() (the function that assigns document.title), so the browser tab title stays untouched — regardless of the app's domain or placement mode.
To put a title into the browser tab, open the view as a slider with a bx24_title option (see slider.openSliderAppPage):
await $b24.slider.openSliderAppPage({ bx24_title: 'Q1 2025 — John Smith' })
For full, dynamic control of the browser tab title (e.g. telling apart several standalone browser tabs of your app), the app must own the top-level document — i.e. run as a standalone page outside the portal iframe, where you set document.title yourself.
imCallTo
async imCallTo(userId: number, isVideo: boolean = true): Promise<void>
Initiates a call through internal communication.
imPhoneTo
async imPhoneTo(phone: string): Promise<void>
Makes a call to the specified phone number.
imOpenMessenger
async imOpenMessenger(dialogId: number|'chat${number}'|'sg${number}'|'imol|${number}'|undefined): Promise<void>
Opens the messenger window.
imOpenHistory
async imOpenHistory(dialogId: number|'chat${number}'|'imol|${number}'): Promise<void>
Opens the message history window.