poorejc commented on issue #50: URL: https://github.com/apache/incubator-flagon-useralejs/issues/50#issuecomment-801276755
document.addEventListener('visibilitychange', function () { if (document.visibilityState === 'hidden' && logs.length > 0) { navigator.sendBeacon(config.url, JSON.stringify(logs)); } }); this code does work to the desired behavior. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org