AdaptiveCards
AdaptiveCards copied to clipboard
[Designer] Update designer service worker
Description
When a new service worker is installed, we need to make sure that it claims all existing clients on activation and does not wait to take over for the prior service worker.
Otherwise, the new service worker would not take over until prior clients are closed/refreshed.
See documentation here: https://developer.mozilla.org/en-US/docs/Web/API/Clients/claim https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/skipWaiting
The caching strategy was also changed from StaleWhileRevalidate to NetworkFirst.
How Verified
Tested on the Adaptive Cards Designer.
Microsoft Reviewers: Open in CodeFlow
Hi @anna-dingler. Thanks for helping make the AdaptiveCards JS renderer + tooling better. As additional verification, once the JS build succeeds, please go to the test site to test out your website/designer changes.
Hi @anna-dingler. This pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along.
Staleness reset by anna-dingler