Skip to content

Notifications API actions/maxActions and friends#44184

Open
hamishwillee wants to merge 6 commits into
mdn:mainfrom
hamishwillee:ff152_Navigation_improvements
Open

Notifications API actions/maxActions and friends#44184
hamishwillee wants to merge 6 commits into
mdn:mainfrom
hamishwillee:ff152_Navigation_improvements

Conversation

@hamishwillee
Copy link
Copy Markdown
Collaborator

FF152 supports Notification.actions and Notification/.maxActions in https://bugzilla.mozilla.org/show_bug.cgi?id=1959931

This does some work on those methods to make them more useful and specification compliant.

I also did some work on the top level API page to better highlight the two types of notifications and where you choose them.
There are problems with non-persistent notifications not working on mobile plaforms, so most users who aren't locking down their code to run on desktop will need to use the persistent notifications.
However the docs were written before the persistent notifications were invented.
While they mention them in the top level, the user guide is very thin.
The whole thing needs a revisit. This is what I have time for as part of FF release work.

Related docs work can be tracked in #44159

@hamishwillee hamishwillee requested a review from a team as a code owner May 19, 2026 06:31
@hamishwillee hamishwillee requested review from chrisdavidmills and removed request for a team May 19, 2026 06:31
@github-actions github-actions Bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels May 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

Comment thread files/en-us/web/api/notification/notification/index.md
Comment thread files/en-us/web/api/notification/actions/index.md
Copy link
Copy Markdown
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hamishwillee, some really good updates here. I've provided a bunch of comments, but not really anything major. Enjoy!

Comment thread files/en-us/web/api/notification/actions/index.md
Comment thread files/en-us/web/api/notification/actions/index.md Outdated
Comment thread files/en-us/web/api/notification/actions/index.md Outdated
Comment thread files/en-us/web/api/notification/actions/index.md Outdated
Comment thread files/en-us/web/api/notification/maxactions_static/index.md Outdated
Comment thread files/en-us/web/api/notifications_api/index.md Outdated
Comment thread files/en-us/web/api/notifications_api/index.md Outdated
Comment thread files/en-us/web/api/notification/notification/index.md Outdated
Comment thread files/en-us/web/api/notification/notification/index.md Outdated
Comment thread files/en-us/web/api/notification/notification/index.md Outdated
Comment thread files/en-us/web/api/notification/notification/index.md Outdated
Comment thread files/en-us/web/api/notifications_api/index.md Outdated
Comment thread files/en-us/web/api/notifications_api/index.md Outdated
hamishwillee and others added 4 commits May 22, 2026 10:45
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
}
```

To invoke the above function at an appropriate time, you could listen to the
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was just wrong.


## Examples

### Basic usage
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI updated/added two new examples. This one is the original using await async and showing how tag is used. The second shows actions.

@hamishwillee
Copy link
Copy Markdown
Collaborator Author

Thanks very much Chris! Ready for another round.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

3 participants