Reference / @getenginex/sdk-igaming/first-frame / FirstFrameHandlers
FirstFrameHandlers
Handlers for the iframe events. All optional; a handler that throws (or rejects) is ignored and does not prevent the others.
Methods
onBetPlaced()?
optionalonBetPlaced(data):void
BET_WAS_PLACED: a bet was placed (a good moment to re-read the balance).
Parameters
data
unknown
Returns
void
onDepositClick()?
optionalonDepositClick(data):void
depositClick: the player asked to deposit.
Parameters
data
unknown
Returns
void
onEvent()?
optionalonEvent(eventType,eventData):void
Every accepted event, including those that also have a dedicated handler.
Parameters
eventType
string
eventData
unknown
Returns
void
onHeightChange()?
optionalonHeightChange(height):void
on-page-height-change / ON_PAGE_HEIGHT_CHANGE: new content height (px, positive).
Parameters
height
number
Returns
void
onInsufficientFunds()?
optionalonInsufficientFunds(data):void
INSUFFICIENT_FUNDS: insufficient balance for the bet.
Parameters
data
unknown
Returns
void
onLoginRequired()?
optionalonLoginRequired(data):void
PLACE_BET_CLICKED_NOT_LOGGED_IN or OPEN_LOGIN_POPUP: the player needs to log in.
Parameters
data
unknown
Returns
void
onReady()?
optionalonReady():void
APP_READY: the sportsbook has loaded and accepts send.
Returns
void
onRedirect()?
optionalonRedirect(data):void
BUTTON_REDIRECT: FIRST asks to open a link. data.link comes at the top of the message (or in eventData) and may be missing or not a valid URL. Validate before opening: accept only http(s), without credentials.
Parameters
data
Returns
void
onScrollToTop()?
optionalonScrollToTop():void
SCROLL_TO_TOP: FIRST asks to scroll the page to the top.
Returns
void