Skip to content

Commit

Permalink
Add frameAncestors to OnBeforeSendHeaders.details (mdn#29873)
Browse files Browse the repository at this point in the history
It can be observed in Firefox that the details in the OnBeforeSendHeaders callback have the frameAncestors field.
This was previously not documented on MDN.
  • Loading branch information
vringar authored Nov 28, 2023
1 parent 289d631 commit bae4c01
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ Events have three functions:
- : `string`. If the request is from a tab open in a contextual identity, the cookie store ID of the contextual identity. See [Work with contextual identities](/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities) for more information.
- `documentUrl`
- : `string`. URL of the document in which the resource will be loaded. For example, if the web page at "https\://example.com" contains an image or an iframe, then the `documentUrl` for the image or iframe will be "https\://example.com". For a top-level document, `documentUrl` is undefined.
- `frameAncestors`
- : `array`. Contains information for each document in the frame hierarchy up to the top-level document. The first element in the array contains information about the immediate parent of the document being requested, and the last element contains information about the top-level document. If the load is actually for the top-level document, then this array is empty.
- `url`
- : `string`. The URL that the document was loaded from.
- `frameId`
- : `integer`. The `frameId` of the document. `details.frameAncestors[0].frameId` is the same as `details.parentFrameId`.
- `frameId`
- : `integer`. Zero if the request happens in the main frame; a positive value is the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (`type` is `main_frame` or `sub_frame`), `frameId` indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab.
- `incognito`
Expand Down

0 comments on commit bae4c01

Please sign in to comment.