Skip to content

AddWebResourceRequestedFilter - cWebView2Browser

Sets up a resource request filter that will enable the OnWebResourceRequested for these requests

Type: Procedure

Parameters

Parameter Type Description
sUrl String URL filter pattern determining which requests will be filtered. The * wildcard can be used to match multiple URLs. Using "*" will match any URLs.
optResourceContext OLECOREWEBVIEW2_WEB_RESOURCE_CONTEXT (optional) The resource types that need to be filtered (OLECOREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL for everything).

Syntax

Procedure AddWebResourceRequestedFilter String sUrl OLECOREWEBVIEW2_WEB_RESOURCE_CONTEXT optResourceContext

Call Example

Send AddWebResourceRequestedFilter sUrl optResourceContext

Description

Sets up a resource request filter that will enable the OnWebResourceRequested for these requests.

The OnCreate event would be the best place to set up these filters. Use RemoveWebResourceRequestedFilter to remove filters.