WebApp

external class WebApp

Constructors

Link copied to clipboard
fun WebApp()

Functions

Link copied to clipboard
fun close()
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)

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 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
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.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