I’m trying to detect when the focused tab completes loading, but I
can’t get it detected just right. I’ve tried both noise-WebProgress-
stop and DOMContentLoaded. The differences from my desired behaviour
are such:
1. I want the sound to play only when the current tab completes
loading, not background tabs. (Otherwise, it’s just confusing.)
2. I want the sound to play only when a page actually completes
loading, not when I have manually stopped it in the middle of loading.
3. The sound should never play when I open a new blank tab. I have
tried DOMContentLoaded&event.target.baseURI!='about:blank', but that
doesn’t work.
Incidentally, Navigational Sounds seems to have fewer problems with
the ‘Complete Navigation’ event.
What event should I use to avoid these problems?
Thank you.