MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Feature]: Intercept all features passed into window.open

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

@Lakshmisha-KS is already working on this.

Since Feb 12, 2025.

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

Description

Describe the feature/enhancement you need

I want to be able to intercept all features (raw string) passed into window.open.

I'm connecting to a site that might pass features not in the spec, and I want to grab those.

In Electron, I could intercept window.open via setWindowOpenHandler and then access details.features to get all the features passed in (even those that weren't part of the spec).

In Webview2, I intercept the NewWindowRequested event. The passed-in args have a WindowFeatures property, but it's typed as a CoreWebView2WindowFeatures and only includes a few properties.

Is there no way to grab all the features passed into window.open?

The scenario/use case where you would use this feature

Site passed special features into window.open. I want to intercept the window creation and configure the window differently depending on those features. I'm pretty sure the current set of features isn't even complete based on the spec. For example, noopener is missing.

How important is this request to you?

Impactful. My app's user experience would be significantly compromised without it.

Suggested implementation

include the raw feature string in the event like Electron does (seemed to be passed from here)

What does your app do? Is there a pending deadline for this request?

No response

AB#50236866

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.