Click or drag to resize

PageClientAddScriptToEvaluateOnNewDocumentAsync Method

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

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

Parameters

source  String
source
worldName  String  (Optional)
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  NullableBoolean  (Optional)
Specifies whether command line API should be available to the script, defaultsto false.
runImmediately  NullableBoolean  (Optional)
If true, runs the script immediately on existing execution contexts or worlds.Default: false.

Return Value

TaskAddScriptToEvaluateOnNewDocumentResponse
returns System.Threading.Tasks.Task<AddScriptToEvaluateOnNewDocumentResponse>
See Also