Skip to content
New issue

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

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

Already on GitHub? # to your account

API review: Add Workers management APIs. (#4556) #4682

Merged
merged 3 commits into from
Feb 25, 2025
Merged

Conversation

monica-ch
Copy link
Contributor

This is an API review for the new Workers API.

* Add workers spec

* added checks

* Per feedback - reference dom apis and example of api usage in workers

* Update specs/Workers.md

Co-authored-by: David Risney <dave@deletethis.net>

* address feedback-2

* remove state and add activated event

* minor updates to the spec

---------

Co-authored-by: David Risney <dave@deletethis.net>
@monica-ch monica-ch added the API Proposal Review WebView2 API Proposal for review. label Jul 15, 2024
@monica-ch monica-ch requested a review from david-risney July 15, 2024 18:04
specs/Workers.md Outdated
ServiceWorkerManager_ = WebViewProfile.ServiceWorkerManager;
}
CoreWebView2ServiceWorkerRegistration registration = await
ServiceWorkerManager_.GetServiceWorkerRegistrationAsync(dialog.Input.Text);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix GetServiceWorkerRegistration docs to note about URI normalization.

specs/Workers.md Outdated

if(registration != null)
{
CoreWebView2ServiceWorker worker = registration.ActiveServiceWorker;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please ensure that it does: ActiveServiceWorker won't destroy until messages pumped and so on.

specs/Workers.md Outdated

if(registration != null)
{
CoreWebView2ServiceWorker worker = registration.ActiveServiceWorker;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the worker instance exits the registration continues to exist.

-- NOTE this is where we stopped in the review meeting.

@david-risney david-risney added the review completed WebView2 API Proposal that's been reviewed and now needs final update and push label Jan 27, 2025
@monica-ch monica-ch closed this Feb 19, 2025
@monica-ch monica-ch reopened this Feb 25, 2025
@monica-ch monica-ch merged commit 08c1965 into main Feb 25, 2025
1 check passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
API Proposal Review WebView2 API Proposal for review. review completed WebView2 API Proposal that's been reviewed and now needs final update and push
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants