Click or drag to resize

RequestContextHandlerOnBeforePluginLoad Method

Version 94.4.20
Called on the CEF IO thread before a plugin instance is loaded. The default plugin policy can be set at runtime using the `--plugin-policy=[allow|detect|block]` command-line flag.

Namespace:  CefSharp.Handler
Assembly:  CefSharp (in CefSharp.dll) Version: 94.4.20.0 (94.4.20.0)
Syntax
protected virtual bool OnBeforePluginLoad(
	string mimeType,
	string url,
	bool isMainFrame,
	string topOriginUrl,
	WebPluginInfo pluginInfo,
	ref PluginPolicy pluginPolicy
)

Parameters

mimeType
Type: SystemString
is the mime type of the plugin that will be loaded
url
Type: SystemString
is the content URL that the plugin will load and may be empty
isMainFrame
Type: SystemBoolean
will be true if the plugin is being loaded in the main (top-level) frame
topOriginUrl
Type: SystemString
is the URL for the top-level frame that contains the plugin
pluginInfo
Type: CefSharpWebPluginInfo
includes additional information about the plugin that will be loaded
pluginPolicy
Type: CefSharpPluginPolicy
Modify and return true to change the policy.

Return Value

Type: Boolean
Return false to use the recommended policy. Modify and return true to change the policy.
See Also