1# Class (PermissionRequest) 2<!--Kit: ArkWeb--> 3<!--Subsystem: Web--> 4<!--Owner: @qq_42700029--> 5<!--Designer: @qiu-gongkai--> 6<!--Tester: @ghiker--> 7<!--Adviser: @HelloCrease--> 8 9Web组件返回授权或拒绝权限功能的对象。示例代码参考[onPermissionRequest事件](./arkts-basic-components-web-events.md#onpermissionrequest9)。 10 11> **说明:** 12> 13> - 该组件首批接口从API version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 14> 15> - 本Class首批接口从API version 9开始支持。 16> 17> - 示例效果请以真机运行为准,当前DevEco Studio预览器不支持。 18 19## constructor<sup>9+</sup> 20 21constructor() 22 23PermissionRequest的构造函数。 24 25**系统能力:** SystemCapability.Web.Webview.Core 26 27## deny<sup>9+</sup> 28 29deny(): void 30 31拒绝网页所请求的权限。 32 33**系统能力:** SystemCapability.Web.Webview.Core 34 35## getOrigin<sup>9+</sup> 36 37getOrigin(): string 38 39获取网页来源。 40 41**系统能力:** SystemCapability.Web.Webview.Core 42 43**返回值:** 44 45| 类型 | 说明 | 46| ------ | ------------ | 47| string | 当前请求权限网页的来源。 | 48 49## getAccessibleResource<sup>9+</sup> 50 51getAccessibleResource(): Array\<string\> 52 53获取网页所请求的权限资源列表,资源列表类型参考[ProtectedResourceType](./arkts-basic-components-web-e.md#protectedresourcetype9)。 54 55**系统能力:** SystemCapability.Web.Webview.Core 56 57**返回值:** 58 59| 类型 | 说明 | 60| --------------- | ------------- | 61| Array\<string\> | 网页所请求的权限资源列表。 | 62 63## grant<sup>9+</sup> 64 65grant(resources: Array\<string\>): void 66 67对网页访问的给定权限进行授权。 68 69**系统能力:** SystemCapability.Web.Webview.Core 70 71**参数:** 72 73| 参数名 | 类型 | 必填 | 说明 | 74| --------- | --------------- | ---- | --------------- | 75| resources | Array\<string\> | 是 | 授予网页请求的权限的资源列表。 |