1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-06-14 13:55:27 +00:00

add shortcuts for telegram and webApp in webapps

This commit is contained in:
InsanusMokrassar 2022-04-19 15:17:07 +06:00
parent fbc5e9f8c4
commit 0e6a708eea

View File

@ -1,5 +1,6 @@
package dev.inmo.tgbotapi.webapps
import kotlinx.browser.window
import org.w3c.dom.Window
external interface Telegram {
@ -8,3 +9,9 @@ external interface Telegram {
val Window.Telegram
get() = asDynamic().Telegram.unsafeCast<Telegram>()
val telegram: Telegram
get() = window.Telegram
val webApp: WebApp
get() = telegram.WebApp