Set Up an Event Handler for the Interface BX24.placement.bindEvent

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
type

Description

event*
string

The name of the event to which the handler subscribes

callback*
callable

The callback function.

The callback handler may or may not receive data depending on the event it subscribes to.

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