Webview
class in
UnityEngine.OpenHarmony
/
Implemented in:UnityEngine.OpenHarmonyJSModule
Suggest a change
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Close
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Close
Description
Provides OpenHarmony Webview functionality encapsulation, supporting creation, management and operation of Webview instances.
Properties
Index | Gets the unique identifier of the Webview. |
IsValid | Gets whether the Webview is valid (Initialized and not deleted). |
Position | Gets or sets the position of the Webview. |
Size | Gets or sets the size of the Webview. |
Url | Gets or sets the current URL loaded in the Webview. |
Visible | Gets or sets the visibility of the Webview. |
Public Methods
Delete | Deletes the current Webview instance. |
DeleteJavaScriptRegister | Delete the JavaScript object registered with the specified name via registerJavaScriptProxy. After deletion, call the Webview.Reload(). |
EvaluateJS | Executes JavaScript code. |
GoBack | Navigates back to the previous page. |
GoForward | Navigates forward to the next page. |
LoadData | Loads data content. |
LoadHTMLString | Loads HTML string content. |
RegisterJavaScriptProxy | Register JavaScript object so that it's able to be called in html. After registration, call the Webview.Reload() for the changes to take effect. |
Reload | Reloads the current page. |
SetMargins | Sets the margins of the Webview. |
SetWebviewAttributes | Set new appearance attributes for webview. |
StopLoading | Stops loading the current page. |
Events
OnConsole | Triggered when JavaScript console print a message. |
OnError | Triggered when an error occurs in the Webview. |
OnHttpError | Triggered when an HTTP error occurs in the Webview. |