mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat: Attribute network requests to frames (#1646)
This patch introduces `request.frame()` method that returns the frame that initiated request. Fixes #1579
This commit is contained in:
committed by
Andrey Lushnikov
parent
5843f6f775
commit
c29822d663
@@ -179,6 +179,7 @@
|
||||
* [request.abort([errorCode])](#requestaborterrorcode)
|
||||
* [request.continue([overrides])](#requestcontinueoverrides)
|
||||
* [request.failure()](#requestfailure)
|
||||
* [request.frame()](#requestframe)
|
||||
* [request.headers()](#requestheaders)
|
||||
* [request.method()](#requestmethod)
|
||||
* [request.postData()](#requestpostdata)
|
||||
@@ -2061,6 +2062,9 @@ page.on('requestfailed', request => {
|
||||
});
|
||||
```
|
||||
|
||||
#### request.frame()
|
||||
- returns: <?[Frame]> A matching [Frame] object, or `null` if navigating to error pages.
|
||||
|
||||
#### request.headers()
|
||||
- returns: <[Object]> An object with HTTP headers associated with the request. All header names are lower-case.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user