From ab34866d43bb492f0e2b9744f7738ea6e345206a Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 26 Aug 2023 13:14:22 +0000 Subject: [PATCH] Update content of files --- data/web/telegram.org/js/telegram-web-app.js | 11 +++++------ data/web/webappcontent.telegram.org/cafe.html | 2 +- data/web/webappcontent.telegram.org/demo.html | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/data/web/telegram.org/js/telegram-web-app.js b/data/web/telegram.org/js/telegram-web-app.js index ba4e68ef9e..01effbd0bb 100644 --- a/data/web/telegram.org/js/telegram-web-app.js +++ b/data/web/telegram.org/js/telegram-web-app.js @@ -128,10 +128,12 @@ if (window.TelegramWebviewProxy !== undefined) { TelegramWebviewProxy.postEvent(eventType, JSON.stringify(eventData)); + console.log('[Telegram.WebView] > postEvent via TelegramWebviewProxy', eventType, eventData); callback(); } else if (window.external && 'notify' in window.external) { window.external.notify(JSON.stringify({eventType: eventType, eventData: eventData})); + console.log('[Telegram.WebView] postEvent via external.notify', eventType, eventData); callback(); } else if (isIframe) { @@ -140,23 +142,20 @@ // For now we don't restrict target, for testing purposes trustedTarget = '*'; window.parent.postMessage(JSON.stringify({eventType: eventType, eventData: eventData}), trustedTarget); - if (initParams.tgWebAppDebug) { - console.log('[Telegram.WebView] postEvent via postMessage', eventType, eventData); - } + console.log('[Telegram.WebView] postEvent via postMessage', eventType, eventData); callback(); } catch (e) { callback(e); } } else { - if (initParams.tgWebAppDebug) { - console.log('[Telegram.WebView] postEvent', eventType, eventData); - } + console.log('[Telegram.WebView] postEvent', eventType, eventData); callback({notAvailable: true}); } }; function receiveEvent(eventType, eventData) { + console.log('[Telegram.WebView] receiveEvent', eventType, eventData); callEventCallbacks(eventType, function(callback) { callback(eventType, eventData); }); diff --git a/data/web/webappcontent.telegram.org/cafe.html b/data/web/webappcontent.telegram.org/cafe.html index 19bd45f17d..212b5d8dba 100644 --- a/data/web/webappcontent.telegram.org/cafe.html +++ b/data/web/webappcontent.telegram.org/cafe.html @@ -9,7 +9,7 @@ - + +