PageClientAddScriptToEvaluateOnNewDocumentAsync Method |
Version 87.1.132
Evaluates given script in every frame upon creation (before loading frame's scripts).
Namespace:
CefSharp.DevTools.Page
Assembly:
CefSharp (in CefSharp.dll) Version: 87.1.132.0 (87.1.132.0)
Syntax public Task<AddScriptToEvaluateOnNewDocumentResponse> AddScriptToEvaluateOnNewDocumentAsync(
string source,
string worldName = null
)
public:
Task<AddScriptToEvaluateOnNewDocumentResponse^>^ AddScriptToEvaluateOnNewDocumentAsync(
String^ source,
String^ worldName = nullptr
)
Parameters
- source
- Type: SystemString
source - worldName (Optional)
- Type: SystemString
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.
Return Value
Type:
TaskAddScriptToEvaluateOnNewDocumentResponsereturns System.Threading.Tasks.Task<AddScriptToEvaluateOnNewDocumentResponse>
See Also