docs: deprecate: Request.serviceWorker() (#32136)

This commit is contained in:
Max Schmitt 2024-08-13 15:59:30 +02:00 committed by GitHub
parent a28f51a0f3
commit b7ed4d7b9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 15 deletions

View file

@ -288,15 +288,10 @@ Returns the matching [Response] object, or `null` if the response was not receiv
## method: Request.serviceWorker
* since: v1.24
* langs: js
* deprecated: Requests made by a Service Worker are not reported in Playwright.
- returns: <[null]|[Worker]>
The Service [Worker] that is performing the request.
**Details**
This method is Chromium only. It's safe to call when using other browsers, but it will always be `null`.
Requests originated in a Service Worker do not have a [`method: Request.frame`] available.
This method will always return `null`.
## async method: Request.sizes
* since: v1.15

View file

@ -19134,14 +19134,8 @@ export interface Request {
response(): Promise<null|Response>;
/**
* The Service {@link Worker} that is performing the request.
*
* **Details**
*
* This method is Chromium only. It's safe to call when using other browsers, but it will always be `null`.
*
* Requests originated in a Service Worker do not have a
* [request.frame()](https://playwright.dev/docs/api/class-request#request-frame) available.
* This method will always return `null`.
* @deprecated Requests made by a Service Worker are not reported in Playwright.
*/
serviceWorker(): null|Worker;