From 53c832f09b5f55b2cbe040907bff8abfb7b57f72 Mon Sep 17 00:00:00 2001 From: Hoarfroster Date: Tue, 31 Dec 2024 01:41:39 +0800 Subject: [PATCH] WebExt: fix typo in examples (#37348) * Update index.md * Update index.md * Update index.md --- .../add-ons/webextensions/api/browseraction/seticon/index.md | 4 ++-- .../add-ons/webextensions/api/pageaction/seticon/index.md | 4 ++-- .../add-ons/webextensions/api/sidebaraction/seticon/index.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/files/en-us/mozilla/add-ons/webextensions/api/browseraction/seticon/index.md b/files/en-us/mozilla/add-ons/webextensions/api/browseraction/seticon/index.md index 2e7d602304cce3e..528db7dc16eb48b 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/browseraction/seticon/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/browseraction/seticon/index.md @@ -38,7 +38,7 @@ let settingIcon = browser.browserAction.setIcon( Use a dictionary object to specify multiple `ImageData` objects in different sizes, so the icon does not have to be scaled for a device with a different pixel density. If `imageData` is a dictionary, the value of each property is an `ImageData` object, and its name is its size, like this: ```js - let settingIcon = browser.action.setIcon({ + let settingIcon = browser.browserAction.setIcon({ imageData: { 16: image16, 32: image32, @@ -55,7 +55,7 @@ let settingIcon = browser.browserAction.setIcon( Use a dictionary object to specify multiple icon files in different sizes, so the icon does not have to be scaled for a device with a different pixel density. If `path` is a dictionary, the value of each property is a relative path, and its name is its size, like this: ```js - let settingIcon = browser.action.setIcon({ + let settingIcon = browser.browserAction.setIcon({ path: { 16: "path/to/image16.jpg", 32: "path/to/image32.jpg", diff --git a/files/en-us/mozilla/add-ons/webextensions/api/pageaction/seticon/index.md b/files/en-us/mozilla/add-ons/webextensions/api/pageaction/seticon/index.md index c1be69c07a2eaca..11e01053be312a1 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/pageaction/seticon/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/pageaction/seticon/index.md @@ -36,7 +36,7 @@ let settingIcon = browser.pageAction.setIcon( Use a dictionary object to specify multiple `ImageData` objects in different sizes, so the icon does not have to be scaled for a device with a different pixel density. If `imageData` is a dictionary, the value of each property is an `ImageData` object, and its name is its size, like this: ```js - let settingIcon = browser.action.setIcon({ + let settingIcon = browser.pageAction.setIcon({ imageData: { 16: image16, 32: image32, @@ -53,7 +53,7 @@ let settingIcon = browser.pageAction.setIcon( Use a dictionary object to specify multiple icon files in different sizes, so the icon does not have to be scaled for a device with a different pixel density. If `path` is a dictionary, the value of each property is a relative path, and its name is its size, like this: ```js - let settingIcon = browser.action.setIcon({ + let settingIcon = browser.pageAction.setIcon({ path: { 16: "path/to/image16.jpg", 32: "path/to/image32.jpg", diff --git a/files/en-us/mozilla/add-ons/webextensions/api/sidebaraction/seticon/index.md b/files/en-us/mozilla/add-ons/webextensions/api/sidebaraction/seticon/index.md index 02a6adb07378efd..02a51f72ba741ce 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/sidebaraction/seticon/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/sidebaraction/seticon/index.md @@ -48,7 +48,7 @@ let settingIcon = browser.sidebarAction.setIcon( Use a dictionary object to specify multiple `ImageData` objects in different sizes, so the icon does not have to be scaled for a device with a different pixel density. If `imageData` is a dictionary, the value of each property is an `ImageData` object, and its name is its size, like this: ```js - let settingIcon = browser.action.setIcon({ + let settingIcon = browser.sidebarAction.setIcon({ imageData: { 16: image16, 32: image32, @@ -65,7 +65,7 @@ let settingIcon = browser.sidebarAction.setIcon( Use a dictionary object to specify multiple icon files in different sizes, so the icon does not have to be scaled for a device with a different pixel density. If `path` is a dictionary, the value of each property is a relative path, and its name is its size, like this: ```js - let settingIcon = browser.action.setIcon({ + let settingIcon = browser.sidebarAction.setIcon({ path: { 16: "path/to/image16.jpg", 32: "path/to/image32.jpg",