mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-25 03:28:44 +00:00
add shortcuts for telegram and webApp in webapps
This commit is contained in:
parent
fbc5e9f8c4
commit
0e6a708eea
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user