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

Add new window requested event callback/event #527

Closed
1 of 2 tasks
atlanticaccent opened this issue Mar 24, 2022 · 0 comments · Fixed by #526 or #619 · May be fixed by Beanow/wry#1
Closed
1 of 2 tasks

Add new window requested event callback/event #527

atlanticaccent opened this issue Mar 24, 2022 · 0 comments · Fixed by #526 or #619 · May be fixed by Beanow/wry#1

Comments

@atlanticaccent
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I'd like to be able to intercept and view information about new window events (ie: popups, target=_blank links, etc) and choose whether to allow them.

Describe the solution you'd like
A way to register a handler for new window events.

Describe alternatives you've considered
Onbeforeload javascript to rewrite and/or register javascript event handlers on all potential sources of navigation - this does not cover programatically added buttons and a number of other cases.
Proxying - requires a local proxy on the entire host machine OR implementation of the proxying configuration on webviews. Either option would probably be quite cumbersome.

Would you assign yourself to implement this feature?

  • Yes
  • No

Additional context
I'm creating this issue as more of a formality than anything - I already have a PR for this open

@amrbashir amrbashir linked a pull request Mar 24, 2022 that will close this issue
13 tasks
amrbashir added a commit that referenced this issue Jun 19, 2022
* Add handler + setter to webviewattr

* Basic impl for windows

* Add new window request event example

* Implement new window request event for linux

* Attempt WKWebview implementation

* Fix WKWebview implementation

Also fixes incorrect drop impl

* Improve formatting

* Update examples/new_window_req_event.rs

Remove set automation

Co-authored-by: Amr Bashir <[email protected]>

* Improve docs

* Adjust to match changes in dev

* fmt

* changefil

* fix windows

Co-authored-by: Iain Laird <[email protected]>
Co-authored-by: Amr Bashir <[email protected]>
This was referenced Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant