Created by: arackaf
Simple change to have the onUpdate callback fire when a newly installed service worker is waiting. This ensures the notification will not just come the first time the sw is updated, but rather each refresh until it takes over.
The modified code was run in my local project, and the onUpdate did continue to show on each refresh until all tabs were closed, and the new sw took over.