initializeB24Frame(options?: {
version?: ApiVersion
restrictionParams?: Partial<RestrictionParams>
}): Promise<B24Frame>
The initializeB24Frame function is designed to initialize a B24Frame object, which is used for working with Bitrix24 applications.
It manages the initialization process and handles potential connection errors.
Supports repeated calls until initialization is complete: every caller shares a single in-flight promise, so concurrent calls await one handshake and a resolved value is returned instantly.
If the app is opened outside the Bitrix24 iframe (a direct URL, a dev server, the install screen),
window.name carries no DOMAIN/APP_SID. The promise then rejects promptly with an SdkError (code: JSSDK_CLIENT_SIDE_WARNING, status: 500) instead of hanging — including every concurrent caller sharing that promise — and a later call may retry once the app runs inside Bitrix24. Always await inside try/catch.Parameters
options?— optional configuration:restrictionParams?: Partial<RestrictionParams>— rate-limit / retry tuning forwarded to the frame's HTTP transports (the same knobs assetRestrictionManagerParams). Omit to use the defaults. Example:initializeB24Frame({ restrictionParams: { retryOnNetworkError: false } }).version?: ApiVersion— reserved; accepted by the type but not yet consumed by the frame, so it currently has no effect.
Return Value
Promise<B24Frame>: Returns a promise that resolves to aB24Frameobject upon successful initialization.
Usage
import { initializeB24Frame } from '@bitrix24/b24jssdk'
Introduction
Designed for managing Bitrix24 applications running inside a placement iframe. Inherits from AbstractB24 and exposes managers for authentication, parent-window messaging, sliders, dialogs, placements, and options.
Auth
Designed for managing authentication in Bitrix24 applications. It handles authentication data received from the parent window and provides methods for updating and retrieving this data.