Click or drag to resize

PageClient.AddScriptToEvaluateOnNewDocumentAsync Method

Version 106.0.290
Evaluates given script in every frame upon creation (before loading frame's scripts).

Namespace:  CefSharp.DevTools.Page
Assembly:  CefSharp (in CefSharp.dll) Version: 106.0.290.0 (106.0.290.0)
Syntax
public Task<AddScriptToEvaluateOnNewDocumentResponse> AddScriptToEvaluateOnNewDocumentAsync(
	string source,
	string worldName = null,
	bool? includeCommandLineAPI = null
)

Parameters

source
Type: System.String
source
worldName (Optional)
Type: System.String
If specified, creates an isolated world with the given name and evaluates given script in it.This world name will be used as the ExecutionContextDescription::name when the correspondingevent is emitted.
includeCommandLineAPI (Optional)
Type: System.Nullable<Boolean>
Specifies whether command line API should be available to the script, defaultsto false.

Return Value

Type: Task<AddScriptToEvaluateOnNewDocumentResponse>
returns System.Threading.Tasks.Task<AddScriptToEvaluateOnNewDocumentResponse>
See Also