4nm
Version:
TypeScript reimplementation of Telegram's official library for communicating with Telegram Web Apps.
34 lines (33 loc) • 991 B
JavaScript
/**
* User clicked back button.
*
* @since WebApp version 6.1+
*/
export const BACK_BUTTON_PRESSED_EVENT = 'back_button_pressed';
/**
* Request to update application style.
*/
export const SET_CUSTOM_STYLE_EVENT = 'set_custom_style';
/**
* Occurs when the Settings item in context menu is pressed.
* eventHandler receives no parameters.
* FIXME: We dont know how to imitate.
*
* @since WebApp version 6.1+
*/
export const SETTINGS_BUTTON_PRESSED_EVENT = 'settings_button_pressed';
/**
* Occurs whenever theme settings are changed in the user's Telegram app
* (including switching to night mode).
*/
export const THEME_CHANGED_EVENT = 'theme_changed';
export const VIEWPORT_CHANGED_EVENT = 'viewport_changed';
export const INVOICE_CLOSED_EVENT = 'invoice_closed';
/**
* User clicked main button.
*/
export const MAIN_BUTTON_PRESSED_EVENT = 'main_button_pressed';
/**
* Popup was closed.
*/
export const POPUP_CLOSED_EVENT = 'popup_closed';