Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com> Co-authored-by: Lawrence S <lboogie@Lawrences-Air.attlocal.net> Co-authored-by: Rajat Talesra <rajat@forem.com>
14 lines
350 B
JavaScript
14 lines
350 B
JavaScript
export function sendHapticMessage(message) {
|
|
try {
|
|
if (
|
|
window &&
|
|
window.webkit &&
|
|
window.webkit.messageHandlers &&
|
|
window.webkit.messageHandlers.haptic
|
|
) {
|
|
window.webkit.messageHandlers.haptic.postMessage(message);
|
|
}
|
|
} catch (err) {
|
|
console.log(err.message); // eslint-disable-line no-console
|
|
}
|
|
}
|