Post

Replies

Boosts

Views

Activity

Reply to Preventing JavaScript from Stopping in Safari When It Goes into the Background
SampleCode <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> .counter { display: flex; font-size: 70px; justify-content: center; align-items: center; margin-top: 50%; } </style> </head> <body> <p class="counter"></p> </body> <script> let count = 0; setInterval(() => { count++; document.querySelector('.counter').textContent = count; }, 1000); </script> </html>
Topic: Safari & Web SubTopic: General Tags:
Mar ’25
Reply to Preventing JavaScript from Stopping in Safari When It Goes into the Background
SampleCode <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> .counter { display: flex; font-size: 70px; justify-content: center; align-items: center; margin-top: 50%; } </style> </head> <body> <p class="counter"></p> </body> <script> let count = 0; setInterval(() => { count++; document.querySelector('.counter').textContent = count; }, 1000); </script> </html>
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to Preventing JavaScript from Stopping in Safari When It Goes into the Background
The operating environment is iOS. So, it is intentional for the operation to stop in the background on iOS. @Braden_Tiernan I first learned that this can be detected! Thank you!
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’25