CoreWebView2.RemoveHostObjectFromScript(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes the host object specified by the name so that it is no longer accessible from JavaScript code in the WebView.
public void RemoveHostObjectFromScript (string name);
member this.RemoveHostObjectFromScript : string -> unit
Public Sub RemoveHostObjectFromScript (name As String)
Parameters
- name
- String
The name of the host object to be removed.
Remarks
While new access attempts are denied, if the object is already obtained by JavaScript code in the WebView, the JavaScript code continues to have access to that object. Running this method for a name that is already removed or never added fails.