-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistency: notifications.NotificationOptions #445
Comments
@erosman what happens when you use any of the unsupported properties? Will they be ignored or will an exception be thrown? If browsers just ignore unsupported properties I do not see any big issue for now. |
Example: browser.notifications.create('', {
type: 'basic',
iconUrl: '/image/icon48.png',
title: 'Reminder',
message: "Proceed?",
buttons: [
{
title: "Yes, get me there"
},
{
title: "Get out of my way"
}
]
}); It results in an error.
https://searchfox.org/mozilla-central/source/toolkit/components/extensions/Schemas.sys.mjs#2703,2705 throwError(context, msg) {
throw context.makeError(`${msg} for ${this.path.join(".")}.${this.name}.`);
} |
As requested during the 2023-09-28 meeting , I pulled the notification API usage from Chrome. In the below chart, 100% represents all usages of Note that the usages are not mutually exclusive. A single call could use multiple listed options. The exception is the |
TIL github supports mermaid charts pie title browser.notification API usage in Chrome Web Store
"NotificationOptions": 1
".appIconMaskUrl": 1
".buttons": 16
".contextMessage": 5
".eventTime": 4
".imageUrl": 5
".isClickable": 5
".items": 16
".priority": 14
".progress": 12
".requireInteraction": 9
"(None)": 14
|
@patrickkettner Is there any difference if you filter by extensions with users? E.g. >10 users to exclude extensions with barely any usage |
Available options in notifications.NotificationOptions (Chrome NotificationOptions) differ considerably between browsers, as evident in the Browser compatibility.
for Android
on iOS
The text was updated successfully, but these errors were encountered: