Placement Manager Class
Getters
placement
get placement(): string
Returns the placement title. By default, returns 'DEFAULT' if the title is not set.
isDefault
get isDefault(): boolean
Returns true if the placement title is 'DEFAULT'.
options
get options(): any
Returns the placement options object. The object is frozen to prevent modifications.
isSliderMode
get isSliderMode(): boolean
Returns true if the widget is operating in slider mode (option IFRAME is 'Y').
// ... /////
$b24 = await initializeB24Frame()
// ... /////
if ($b24.placement.isSliderMode) {
$b24.parent.setTitle('SliderMode')
}
Methods
getInterface
async getInterface(): Promise<any>
Getting information about the JS interface of the current embedding location: a list of possible commands and events.
// ... /////
$b24 = await initializeB24Frame()
// ... /////
const value: any = await $b24.placement.getInterface()
bindEvent
async bindEvent(eventName: string): Promise<any>
Setting up the event handler for the interface
call
async call(command: string, parameters: Record<string, any> = {}): Promise<any>
Call the registered interface command.
import { LoggerBrowser, LoggerType } from '@bitrix24/b24jssdk'
// ... /////
const logger = LoggerBrowser.build('Demo', true)
$b24 = await initializeB24Frame()
// ... /////
$b24.placement.call('reloadData')
.then((respose: any) => {
logger.log('reload call')
})
Parent
Provides methods for managing the parent application window in Bitrix24, including resizing the window, managing scroll, initiating calls, and opening the messenger.
Slider
Provides methods for working with sliders in the Bitrix24 application. It allows opening and closing sliders, as well as managing their content.