Revert "docs: deprecate: Request.serviceWorker() (#32136)" (#32432)

This reverts commit b7ed4d7b9e.
This commit is contained in:
Yury Semikhatsky 2024-09-03 10:18:20 -07:00 committed by GitHub
parent 565aed6c39
commit b75483bbb4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 4 deletions

View file

@ -288,10 +288,15 @@ Returns the matching [Response] object, or `null` if the response was not receiv
## method: Request.serviceWorker ## method: Request.serviceWorker
* since: v1.24 * since: v1.24
* langs: js * langs: js
* deprecated: Requests made by a Service Worker are not reported in Playwright.
- returns: <[null]|[Worker]> - returns: <[null]|[Worker]>
This method will always return `null`. 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.
## async method: Request.sizes ## async method: Request.sizes
* since: v1.15 * since: v1.15

View file

@ -19237,8 +19237,14 @@ export interface Request {
response(): Promise<null|Response>; response(): Promise<null|Response>;
/** /**
* This method will always return `null`. * The Service {@link Worker} that is performing the request.
* @deprecated Requests made by a Service Worker are not reported in Playwright. *
* **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.
*/ */
serviceWorker(): null|Worker; serviceWorker(): null|Worker;