Menu

#3419 Provide way of calling unregisterRoute when using default router

open
nobody
None
2025-08-08
2025-08-08
Anonymous
No

Originally created by: ymor

Library Affected:
workbox-routing

Browser & Platform:
all browsers

Issue or Feature Request Description:
Router instances have an unregisterRoute method, but, as far as I can tell, if you are using the default Router, there is no way of obtaining the Router instance and hence no way of calling this method.

Would it be possible to either provide access to the workbox-routing.utils.getOrCreateDefaultRouter function or add an unregisterRoute function alongside the existing workbox-routing.registerRoute function that uses the default router?

This is essentially re-opening [#2592]. This feature would be really handy when testing as currently we have no way to clean up the router.

Related

Tickets: #2592

Discussion


Log in to post a comment.