Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !8017
An error occurred while fetching the assigned milestone of the selected merge_request.

Add onUpdate() configuration to service worker registration

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/richarddd/service-worker-config-on-update into master 5 years ago
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes 2

Created by: richarddd

This enables users to tell the service worker to skip waiting.

Example:

serviceWorker.register({
  ...
   onWaiting((waitingWorker) => {
     waitingWorker.postMessage({ type: "SKIP_WAITING" })
     window.location.reload();
   })
...
});

This PR also adds check if multiple service workers are registered so only the correct one triggers the callbacks we pass to serviceWorker.register

Loading
Loading

Activity


  • Administrator requested review from @root 5 years ago

    requested review from @root

  • Administrator requested review from @root 5 years ago

    requested review from @root

  • Administrator requested review from @root 5 years ago

    requested review from @root

  • Administrator requested review from @root 5 years ago

    requested review from @root

  • Administrator
    Administrator @root · 5 years ago
    Author Contributor

    Created by: facebook-github-bot

    Hi richarddd! Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

    If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

  • Administrator added CLA Signed label 5 years ago

    added CLA Signed label

  • Administrator
    Administrator @root · 5 years ago
    Author Contributor

    Created by: facebook-github-bot

    Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

  • Administrator
    Administrator @root · 5 years ago
    Author Contributor

    Created by: stale[bot]

    This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

  • Administrator added stale label 5 years ago

    added stale label

  • Administrator
    Administrator @root · 5 years ago
    Author Contributor

    Created by: stale[bot]

    This pull request has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. Thank you for your contribution!

  • Administrator closed 5 years ago

    closed

Please register or sign in to reply
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: github/fork/richarddd/service-worker-config-on-update

Menu

Explore Projects Groups Snippets