diff --git a/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/MainButton.kt b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/MainButton.kt index 502879a4b9..bed8eaffd0 100644 --- a/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/MainButton.kt +++ b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/MainButton.kt @@ -22,6 +22,9 @@ external class MainButton { fun showProgress(leaveActive: Boolean = definedExternally): MainButton fun hideProgress(): MainButton + /** + * **This method argument do not accept `this` [WebApp] object** + */ fun onClick(eventHandler: () -> Unit): MainButton fun offClick(eventHandler: () -> Unit): MainButton @@ -36,7 +39,7 @@ data class MainButtonParams( val isVisible: Boolean? = null ) -@Deprecated(message="Use onClick without EventHandler") +@Deprecated(message = "Use onClick without EventHandler") fun MainButton.onClick(eventHandler: EventHandler) = onClick { val that = js("this").unsafeCast() that.eventHandler()