Skip to content

Commit

Permalink
Update index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
PassionPenguin authored Dec 4, 2024
1 parent 1cff6db commit f3e40b0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ l10n:

{{AddonSidebar}}

在拓展被禁用时触发
在附加组件被禁用时触发

此 API 需要“management”[API 权限](/zh-CN/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions)

Expand Down Expand Up @@ -37,15 +37,15 @@ browser.management.onDisabled.hasListener(listener)
- : 在此事件发生时调用的函数。此函数接收以下参数:

- `info`
- : [`ExtensionInfo`](/zh-CN/docs/Mozilla/Add-ons/WebExtensions/API/management/ExtensionInfo)关于已安装的拓展的信息
- : [`ExtensionInfo`](/zh-CN/docs/Mozilla/Add-ons/WebExtensions/API/management/ExtensionInfo)关于已安装的附加组件的信息

## 浏览器兼容性

{{Compat}}

## 示例

记录被禁用的拓展的名称
记录被禁用的附加组件的名称

```js
browser.management.onDisabled.addListener((info) => {
Expand Down

0 comments on commit f3e40b0

Please sign in to comment.