Set Up an Event Handler for the Interface BX24.placement.bindEvent
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.
Scope:
placement
The method BX24.placement.bindEvent sets an event handler for the interface. The event must be registered on the calling side; otherwise, nothing will happen.
Parameters
Required parameters are marked with *
|
Name |
Description |
|
event* |
The name of the event to which the handler subscribes |
|
callback* |
The callback function. The |
Code Example
How to Use Examples in Documentation
BX24.ready(function () {
BX24.init(function () {
BX24.placement.bindEvent('BackgroundCallCard::initialized', event => {
// some code
});
BX24.placement.bindEvent('CallCard::CallStateChanged', (callState) => {
console.log(callState);
});
});
});
Continue Learning
- Get Information About the Call Context of BX24.placement.info
- Get Information About the JS Interface of the Current Placement BX24.placement.getInterface
- Call the Registered Interface Command BX24.placement.call
Copied
Previous