mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
add shortcuts for telegram and webApp in webapps
This commit is contained in:
parent
c74df3960c
commit
0a27d9bf28
@ -1,5 +1,6 @@
|
|||||||
package dev.inmo.tgbotapi.webapps
|
package dev.inmo.tgbotapi.webapps
|
||||||
|
|
||||||
|
import kotlinx.browser.window
|
||||||
import org.w3c.dom.Window
|
import org.w3c.dom.Window
|
||||||
|
|
||||||
external interface Telegram {
|
external interface Telegram {
|
||||||
@ -8,3 +9,9 @@ external interface Telegram {
|
|||||||
|
|
||||||
val Window.Telegram
|
val Window.Telegram
|
||||||
get() = asDynamic().Telegram.unsafeCast<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