pub fn off_click(callback: &Closure<dyn Fn()>) -> Result<(), JsValue>Expand description
Remove a previously registered click callback.
§Errors
Returns Err if the deregistration fails or the button is missing.
§Examples
use telegram_webapp_sdk::api::settings_button::{off_click, on_click};
use wasm_bindgen::prelude::Closure;
let cb = Closure::wrap(Box::new(|| {}) as Box<dyn Fn()>);
on_click(&cb)?;
off_click(&cb)?;