MicrosoftEdge / MicrosoftEdge/WebView2Feedback

Add Site Origin and Frame Origin to WebResourceRequested event.

Open
#3,525 3 comments 0 reactions 1 assignee View on GitHub

@Lakshmisha-KS is already working on this.

Since Feb 12, 2025.

feature request tracked
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

The current WebResourceRequested event does not provide a way to identify which page the request originated from.

A basic approach could be to use the current WebView2.Source to get the current page url, or using the NavigationStarting Event. However, due to the way pages are loaded and unloaded by WebView2/Chromium, there is an overlap during the transition from one page to the other where either the new or old page can be sending the requests.

Another approach might be to inspect the referer or origin headers, but not all requests include said header.

As such, we are looking for the Site Origin (and optionally Frame Origin) properties to be added to:

  • WebResourceRequested event
  • Chromium DevTools protocol's Fetch.requestPaused event

AB#44850753

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.