Share via


CoreWebView2.RemoveWebResourceRequestedFilter Method

Definition

Overloads

RemoveWebResourceRequestedFilter(String, CoreWebView2WebResourceContext)

Warning: This method and CoreWebView2.AddWebResourceRequestedFilter(string, CoreWebView2WebResourceContext) are deprecated. Please use AddWebResourceRequestedFilter(String, CoreWebView2WebResourceContext, CoreWebView2WebResourceRequestSourceKinds) and RemoveWebResourceRequestedFilter(String, CoreWebView2WebResourceContext, CoreWebView2WebResourceRequestSourceKinds) instead. Removes a matching WebResource filter that was previously added for the WebResourceRequested event.

RemoveWebResourceRequestedFilter(String, CoreWebView2WebResourceContext, CoreWebView2WebResourceRequestSourceKinds)

Removes a matching WebResource filter that was previously added for the WebResourceRequested event. If the same filter was added multiple times, then it must be removed as many times as it was added for the removal to be effective. Returns E_INVALIDARG for a filter that was not added or is already removed. If the filter was added for multiple requestSourceKinds and removed just for one of them the filter remains for the non-removed requestSourceKinds.

RemoveWebResourceRequestedFilter(String, CoreWebView2WebResourceContext)

Warning: This method and CoreWebView2.AddWebResourceRequestedFilter(string, CoreWebView2WebResourceContext) are deprecated. Please use AddWebResourceRequestedFilter(String, CoreWebView2WebResourceContext, CoreWebView2WebResourceRequestSourceKinds) and RemoveWebResourceRequestedFilter(String, CoreWebView2WebResourceContext, CoreWebView2WebResourceRequestSourceKinds) instead. Removes a matching WebResource filter that was previously added for the WebResourceRequested event.

public void RemoveWebResourceRequestedFilter (string uri, Microsoft.Web.WebView2.Core.CoreWebView2WebResourceContext ResourceContext);
member this.RemoveWebResourceRequestedFilter : string * Microsoft.Web.WebView2.Core.CoreWebView2WebResourceContext -> unit
Public Sub RemoveWebResourceRequestedFilter (uri As String, ResourceContext As CoreWebView2WebResourceContext)

Parameters

uri
String

An URI to at which a web resource filter was added.

ResourceContext
CoreWebView2WebResourceContext

A previously added resource context filter to be removed.

Exceptions

A filter that was never added.

Remarks

If the same filter was added multiple times, then it must need to be removed as many times as it was added for the removal to be effective.

See also

Applies to

RemoveWebResourceRequestedFilter(String, CoreWebView2WebResourceContext, CoreWebView2WebResourceRequestSourceKinds)

Removes a matching WebResource filter that was previously added for the WebResourceRequested event. If the same filter was added multiple times, then it must be removed as many times as it was added for the removal to be effective. Returns E_INVALIDARG for a filter that was not added or is already removed. If the filter was added for multiple requestSourceKinds and removed just for one of them the filter remains for the non-removed requestSourceKinds.

public void RemoveWebResourceRequestedFilter (string uri, Microsoft.Web.WebView2.Core.CoreWebView2WebResourceContext ResourceContext, Microsoft.Web.WebView2.Core.CoreWebView2WebResourceRequestSourceKinds RequestSourceKinds);
public void RemoveWebResourceRequestedFilter (string uri, Microsoft.Web.WebView2.Core.CoreWebView2WebResourceContext ResourceContext, Microsoft.Web.WebView2.Core.CoreWebView2WebResourceRequestSourceKinds requestSourceKinds);
member this.RemoveWebResourceRequestedFilter : string * Microsoft.Web.WebView2.Core.CoreWebView2WebResourceContext * Microsoft.Web.WebView2.Core.CoreWebView2WebResourceRequestSourceKinds -> unit
member this.RemoveWebResourceRequestedFilter : string * Microsoft.Web.WebView2.Core.CoreWebView2WebResourceContext * Microsoft.Web.WebView2.Core.CoreWebView2WebResourceRequestSourceKinds -> unit
Public Sub RemoveWebResourceRequestedFilter (uri As String, ResourceContext As CoreWebView2WebResourceContext, RequestSourceKinds As CoreWebView2WebResourceRequestSourceKinds)
Public Sub RemoveWebResourceRequestedFilter (uri As String, ResourceContext As CoreWebView2WebResourceContext, requestSourceKinds As CoreWebView2WebResourceRequestSourceKinds)

Parameters

uri
String

An URI to be added to the WebResourceRequested event.

ResourceContext
CoreWebView2WebResourceContext

A resource context filter to be added to the WebResourceRequested event.

RequestSourceKindsrequestSourceKinds
CoreWebView2WebResourceRequestSourceKinds

A request source filter to be added to the WebResourceRequested event.

Applies to