Bug 2044712 methods to get contextual identities icons and colors#44372
Open
rebloor wants to merge 1 commit into
Open
Bug 2044712 methods to get contextual identities icons and colors#44372rebloor wants to merge 1 commit into
rebloor wants to merge 1 commit into
Conversation
Contributor
|
Preview URLs (4 pages)
External URLs (2)URL:
|
Rob--W
approved these changes
Jun 9, 2026
|
|
||
| ## Changes for add-on developers | ||
|
|
||
| - Adds the {{WebExtAPIRef("contextualIdentities.getSupportedColors()")}} and {{WebExtAPIRef("contextualIdentities.getSupportedIcons()")}} methods to retrieve the colors and icons available for contextual identities (containers). ([Firefox bug 2044712](https://bugzil.la/2044712)) |
Member
There was a problem hiding this comment.
Nit: could you move this change after the adoptedStyleSheets change? We don't really have a convention for the order, but this change to contextualIdentities is quite niche. I also anticipate another release note for more colors, which would thematically fit with this new API as well: https://bugzilla.mozilla.org/show_bug.cgi?id=2044354#c5
| - `iconUrl` | ||
| - : `string`. A `resource://` URL pointing to the icon's SVG file (for example, `"resource://usercontext-content/fingerprint.svg"`). | ||
|
|
||
| If the contextual identities feature is not enabled, the promise is rejected with an error message. |
Member
There was a problem hiding this comment.
Side note: rejecting with anel error is not what the implementation does right now, but I'll make sure that it behaves so before 153 ships to release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Addresses the dev-docs-needed requirements of Bug 2044712 "Expose colors and icons to extensions" including:
getSupportedIcons()Related issues and pull requests
BCD is provided in mdn/browser-compat-data#29814.