Get Frame Dimensions with BX24.getScrollSize

If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.

The method BX24.getScrollSize returns the dimensions of the current frame's content as an object with the fields scrollWidth and scrollHeight.

Object BX24.getScrollSize()
        

Parameters

No parameters.

Code Example

How to Use Examples in Documentation

BX24.init(function () {
            const size = BX24.getScrollSize();
            console.log(size.scrollWidth, size.scrollHeight);
        });
        

Response Handling

The method synchronously returns an object containing the dimensions of the content.

Returned Data

Name
type

Description

result
object

An object with the dimensions of the frame's content (detailed description)

Object result

Name
type

Description

scrollWidth
integer

The width of the frame's content in pixels

scrollHeight
integer

The height of the frame's content in pixels

Continue Learning