notification_occurred

Function notification_occurred 

Source
pub fn notification_occurred(ty: HapticNotificationType) -> Result<(), JsValue>
Expand description

Triggers a haptic notification feedback.

§Errors

Returns Err(JsValue) if the JavaScript call fails or HapticFeedback is missing.

§Examples

use telegram_webapp_sdk::api::haptic::{HapticNotificationType, notification_occurred};
notification_occurred(HapticNotificationType::Success)?;