Skip to content
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

[Feature]: Add a Reset method #4536

Open
Clemani opened this issue May 6, 2024 · 0 comments
Open

[Feature]: Add a Reset method #4536

Clemani opened this issue May 6, 2024 · 0 comments
Labels
feature request feature request

Comments

@Clemani
Copy link

Clemani commented May 6, 2024

Describe the feature/enhancement you need

I would like to have a method to reset a WebView2 browser instance

The scenario/use case where you would use this feature

I am actually trying to move from CEF/CefGlue to WebView2.
In order to always have ready to use browser controls available (fully initialized) i create browsers in the background and maintain a pool of browsers.
When the user needs a browser the app pulls one out from the pool.
After the browser is actually no more needed by the user i want to give it back to the pool rather then destroying the browser and creating a new one.
The reused browser should behave same as a new one, no session history so after loading the 1st page CanGoBack returns false.

How important is this request to you?

Nice to have. There are other ways to tackle this, but having official API support would be beneficial.

Suggested implementation

Add a "Reset" method which

  • removes session history
  • and shows a blank screen
    Maybe somthing like javascript "window.close()" which does not work in this case.

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

Destroy WebView2 controls and create new ones.
Works fine but a more easy and resource-friendly solution would be nice.

@Clemani Clemani added the feature request feature request label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request feature request
Projects
None yet
Development

No branches or pull requests

1 participant