WebApp

external class WebApp

Constructors

Link copied to clipboard
fun WebApp()

Functions

Link copied to clipboard
fun close()
Link copied to clipboard
fun disableClosingConfirmation()
Link copied to clipboard
fun enableClosingConfirmation()
Link copied to clipboard
fun expand()
Link copied to clipboard
fun isVersionAtLeast(version: String): Boolean
Link copied to clipboard
fun offEvent(type: String, callback: () -> Unit)
Link copied to clipboard
fun offEventWithInvoiceClosedInfo(type: String, callback: (InvoiceClosedInfo) -> Unit)
Link copied to clipboard
fun offEventWithViewportChangedData(type: String, callback: (ViewportChangedData) -> Unit)
Link copied to clipboard
fun openInvoice(url: String, callback: (InvoiceClosedInfo) -> Unit = definedExternally)
Link copied to clipboard
fun openLink(url: String)
Link copied to clipboard
fun openTelegramLink(url: String)
Link copied to clipboard
fun ready()
Link copied to clipboard
fun sendData(data: String)
Link copied to clipboard
fun setBackgroundColor(color: Color.BackgroundColor)
fun setBackgroundColor(color: Color.Hex)
Link copied to clipboard
fun setHeaderColor(color: Color.BackgroundColor)
Link copied to clipboard
fun showAlert(message: String, callback: AlertCallback? = definedExternally)
Link copied to clipboard
fun showConfirm(message: String, callback: ConfirmCallback? = definedExternally)
Link copied to clipboard
fun showPopup(params: PopupParams, callback: ClosePopupCallback? = definedExternally)

Properties

Link copied to clipboard
val backButton: BackButton
Link copied to clipboard
val backgroundColor: HEXColor?
Link copied to clipboard
val colorSchemeRaw: String
Link copied to clipboard
val hapticFeedback: HapticFeedback
Link copied to clipboard
val headerColor: HEXColor?
Link copied to clipboard
val initData: String
Link copied to clipboard
val initDataUnsafe: WebAppInitData
Link copied to clipboard
val isClosingConfirmationEnabled: Boolean
Link copied to clipboard
val isExpanded: Boolean
Link copied to clipboard
val mainButton: MainButton
Link copied to clipboard
val themeParams: ThemeParams
Link copied to clipboard
val version: String
Link copied to clipboard
val viewportHeight: Float
Link copied to clipboard
val viewportStableHeight: Float

Extensions

Link copied to clipboard
val WebApp.colorScheme: ColorScheme
Link copied to clipboard
fun WebApp.isInitDataSafe(botToken: String): Boolean
Link copied to clipboard
fun WebApp.onBackButtonClicked(eventHandler: EventHandler): () -> Unit
Link copied to clipboard
fun WebApp.onEvent(type: EventType, eventHandler: EventHandler): () -> Unit
fun WebApp.onEvent(type: EventType.ViewportChanged, eventHandler: ViewportChangedEventHandler): (ViewportChangedData) -> Unit
fun WebApp.onEvent(type: EventType.InvoiceClosed, eventHandler: InvoiceClosedEventHandler): (InvoiceClosedInfo) -> Unit
fun WebApp.onEvent(type: EventType.PopupClosed, eventHandler: PopupClosedEventHandler): (String?) -> Unit
Link copied to clipboard
fun WebApp.onInvoiceClosed(eventHandler: InvoiceClosedEventHandler): (InvoiceClosedInfo) -> Unit
Link copied to clipboard
fun WebApp.onMainButtonClicked(eventHandler: EventHandler): () -> Unit
Link copied to clipboard
fun WebApp.onPopupClosed(eventHandler: PopupClosedEventHandler): (String?) -> Unit
Link copied to clipboard
fun WebApp.onSettingsButtonClicked(eventHandler: EventHandler): () -> Unit
Link copied to clipboard
fun WebApp.onThemeChanged(eventHandler: EventHandler): () -> Unit
Link copied to clipboard
fun WebApp.onViewportChanged(eventHandler: ViewportChangedEventHandler): (ViewportChangedData) -> Unit
Link copied to clipboard
var WebApp.requireClosingConfirmation: Boolean
Link copied to clipboard
fun WebApp.showPopup(    message: String,     title: String?,     buttons: Array<PopupButton>,     callback: ClosePopupCallback? = null)
fun WebApp.showPopup(    message: String,     title: String?,     firstButton: PopupButton,     vararg otherButtons: PopupButton,     callback: ClosePopupCallback? = null)
Link copied to clipboard
fun WebApp.toggleClosingConfirmation()