Skip to content

Allow cancelling/overriding web resources in NativeWebView WebResourceRequested event #53

@duncanlang

Description

@duncanlang

Is your feature request related to a problem? Please describe.

Currently, WebResourceRequestedEventArgs only contains information about the requested web resource with no way to interact with the requested resource. It would be useful to allow a way to cancel the requested web resource from within WebResourceRequested event.

Describe the solution you'd like

I would like to see the WebResourceRequestedEventArgs have a way to cancel the requested resource (something like e.Cancel = true), similar to the WebViewNavigationStartingEventArgs which allows for cancelling of navigation.

Another options could be to even allow to override/force a response for the requested web resource instead of simply cancelling it (and something like setting a blank response would be equivalent to cancelling it).

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions