Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we allow registerRouter() to be called multiple times? #10

Closed
yoshisatoyanagisawa opened this issue Oct 11, 2023 · 2 comments
Closed

Comments

@yoshisatoyanagisawa
Copy link
Collaborator

The issue was originally asked by @sisidovski in w3c/ServiceWorker#1373 (comment).

To allow 3rd parties use registerRouter() to handle something, allowing registerRouter to be called multiple times was suggested.
In the discussion in w3c/ServiceWorker#1373, people are roughly agreed on allowing to call the registration function multiple times. However, renaming the function name was suggested there.

@domenic
Copy link
Contributor

domenic commented Oct 23, 2023

I think registerRoutes() is a reasonable rename. In w3c/ServiceWorker#1373 (comment) @jakearchibald seems to slightly prefer addRoutes(). Either seem good to me.

yoshisatoyanagisawa added a commit to yoshisatoyanagisawa/service-worker-static-routing-api that referenced this issue Nov 9, 2023
To reflect the discussion in WICG#10, the API name has been changed to `addRoutes`, and clarified that the API can be called multiple times.
yoshisatoyanagisawa added a commit that referenced this issue Nov 15, 2023
To reflect the discussion in #10, the API name has been changed to `addRoutes`, and clarified that the API can be called multiple times.
@yoshisatoyanagisawa
Copy link
Collaborator Author

Now registerRouter() has been renamed, and can be called for multiple times.

aarongable pushed a commit to chromium/chromium that referenced this issue Jan 29, 2024
Upon WICG/service-worker-static-routing-api#10
and w3c/ServiceWorker#1373 (comment),
we decided to use addRoutes() instead of registerRouter() to configure
the routes.

This CL updates code using registerRouter() to addRoutes(), and make
calling registerRouter() to warn the deprecation.

Note that this is a follow up CL of:
https://chromium-review.googlesource.com/c/chromium/src/+/5233688/comment/abe857f9_5f5d2fdc/

Bug: 1371756
Change-Id: I1b199310a6701b3b5da38e5ddcaf20280b047e24
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5240149
Reviewed-by: Shunya Shishido <[email protected]>
Commit-Queue: Yoshisato Yanagisawa <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1253156}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants