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 abb30fb commit f7e50a5
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.onUninstalled.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.onUninstalled.addListener((info) => {
Expand Down

0 comments on commit f7e50a5

Please sign in to comment.