WebApp

external class WebApp

Functions

Link copied to clipboard
fun close()
Link copied to clipboard
fun expand()
Link copied to clipboard
fun offEvent(type: String, callback: () -> Unit)
Link copied to clipboard
fun offEventWithBoolean(type: String, callback: (ViewportChangedData) -> Unit)
Link copied to clipboard
fun ready()
Link copied to clipboard
fun sendData(data: String)

Properties

Link copied to clipboard
val colorSchemeRaw: String
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 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.onEvent(type: EventType, eventHandler: EventHandler): () -> Unit
fun WebApp.onEvent(type: EventType.ViewportChanged, eventHandler: ViewportChangedEventHandler): (ViewportChangedData) -> Unit
Link copied to clipboard
fun WebApp.onMainButtonClicked(eventHandler: EventHandler): () -> Unit
Link copied to clipboard
fun WebApp.onThemeChanged(eventHandler: EventHandler): () -> Unit
Link copied to clipboard
fun WebApp.onViewportChanged(eventHandler: ViewportChangedEventHandler): (ViewportChangedData) -> Unit