Event loop in JS may be a whimsical beast. It seems to work politely most of the time, but once you change the environment - be prepared for little pranks. I had a simple feature in my application. When user is idle for too long, popup, with countdown to logout, is displayed. It worked everywhere. Almost... Countdown was bugged in Safari, only on inactive tabs. Fortunately, I’ve quickly identified and fixed cause of this bug, so now, counter works properly in all browsers! I’ll tell you exactly what happened so, you too will handle event loops quirks in a breeze.
Sign up to receive updates about JS Poland, including workshops, speaker previews, ticket launches, JS Awards, Behind the Code Magazine, CFP details and other exclusive content. We won’t spam you and will only send you emails we genuinely think you’ll find interesting. You can unsubscribe at any time and you can find more information here.