-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose windowFeatures passed into window.open in IWebView2NewWindowRequestedEventArgs #70
Comments
Thanks for the feedback! Do you need all of the windowfeatures values? What are you planning to do with them? Thanks! |
We just need x, y, height and width. We have a application that shows multiple web views hosting different web pages. One of them is scrolling news headlines and when a user clicks on a story link the web page passes size and location information for the story popup. We currently handle the new window event to provide a parent window that matches our application style and we use the position and size information to place the window. |
As a workaround, you can patch window.open():
|
The window features is now exposed to the NewWindowRequested event. Please see https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/0-9-538/icorewebview2experimentalnewwindowrequestedeventargs for reference. Please note that this API addition is currently experimental and let us know if this works for you. Thanks! |
This doesn't seem to have been exposed for Winforms? |
We don't support exposing the experimental APIs to WinForms and WPF yet, however it's in our internal backlog. Feel free to create a separate GitHub issue if you'd like to track this. Thanks! |
Thanks, I'll wait, we don't have anything dependant on it. |
Please expose the following parameters in IWebView2NewWindowRequestedEventArgs so the application hosting the new window can honor the settings passed from JavaScript into the window.open() call
It would be similar to how CEF exposes CefPopupFeatures in CefLifeSpanHandler::OnBeforePopup
Thanks.
The text was updated successfully, but these errors were encountered: