From 4245e2d38539c07e02e1a33657fa68c9946a25ab Mon Sep 17 00:00:00 2001 From: Vibhu Dujari Date: Thu, 18 Apr 2024 13:58:03 +0530 Subject: [PATCH] logs for monitorer debugging --- app/services/monitorer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/services/monitorer.js b/app/services/monitorer.js index 9ea36b8..c6d6881 100644 --- a/app/services/monitorer.js +++ b/app/services/monitorer.js @@ -91,8 +91,10 @@ export default Service.extend({ if('webkitHidden' in document) { document.addEventListener("webkitvisibilitychange", this.tabSwitchEventHandler); + console.log('webkitvisibilitychange event added') } else { document.addEventListener("visibilitychange", this.tabSwitchEventHandler); + console.log('visibilitychange event added') } }, @@ -111,6 +113,7 @@ export default Service.extend({ }, async tabSwitchEventHandler() { + console.log('tabSwitchEventHandler', document.hidden, document.webkitHidden) if(!document.hidden) return this.set('tabSwitchTrigger', true) const currentAttempt = await this.router.get('currentRoute.attributes.contest.currentAttempt')