1# Class (JsResult) 2 3Implements the **JsResult** object to confirm or cancel a dialog box. For details about the sample code, see [onAlert](./arkts-basic-components-web-events.md#onalert). 4 5> **NOTE** 6> 7> - The initial APIs of this component are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version. 8> 9> - The initial APIs of this class are supported since API version 8. 10> 11> - You can preview how this component looks on a real device, but not in DevEco Studio Previewer. 12 13## constructor 14 15constructor() 16 17Constructs a **JsResult** object. 18 19**System capability**: SystemCapability.Web.Webview.Core 20 21## handleCancel 22 23handleCancel(): void 24 25Notifies the **Web** component of the user's cancel operation in the dialog box. 26 27**System capability**: SystemCapability.Web.Webview.Core 28 29## handleConfirm 30 31handleConfirm(): void 32 33Notifies the **Web** component of the user's confirm operation in the dialog box. 34 35**System capability**: SystemCapability.Web.Webview.Core 36 37## handlePromptConfirm<sup>9+</sup> 38 39handlePromptConfirm(result: string): void 40 41Notifies the **Web** component of the user's confirm operation in the dialog box as well as the dialog box content. 42 43**System capability**: SystemCapability.Web.Webview.Core 44 45**Parameters** 46 47| Name | Type | Mandatory | Description | 48| ------ | ------ | ---- | ----------- | 49| result | string | Yes | User input in the dialog box.| 50