Adjust Frame Size to Content with BX24.fitWindow
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.fitWindow sends a command to change the height of the application frame to match the height of the page content. It utilizes BX24.getScrollSize().scrollHeight in its implementation.
void BX24.fitWindow([Function callback])
Parameters
|
Name |
Description |
|
callback |
Callback function executed after the resize command is sent |
Code Example
How to Use Examples in Documentation
BX24.init(function () {
BX24.fitWindow(function () {
console.log('Frame resize command sent');
});
});
Response Handling
The method does not return any data (void).
Continue Learning
Copied
Previous
Next