Langue

CoreWebView2.RemoveScriptToExecuteOnDocumentCreated(String) Method

Definition

Removes the corresponding JavaScript added via AddScriptToExecuteOnDocumentCreatedAsync(String) with the specified script ID.

public void RemoveScriptToExecuteOnDocumentCreated(string id);
member this.RemoveScriptToExecuteOnDocumentCreated : string -> unit
Public Sub RemoveScriptToExecuteOnDocumentCreated (id As String)

Parameters

id
String

The ID corresponds to the JavaScript code to be removed from the list of scripts.

Remarks

Both use AddScriptToExecuteOnDocumentCreatedAsync(String) and this method in NewWindowRequested handler at the same time sometimes causes trouble. Since invalid scripts will be ignored, the script IDs you got may not be valid anymore.

Applies to