Files
electron/docs
Shelley Vohr 3b24d8f7f6 feat: add app.setActivationToken() on Linux (#54989)
* feat: add app.setActivationToken() on Linux

A Wayland compositor only raises a window when the request carries an XDG
activation token. Electron forwards the tokens it receives at launch and from
its own notifications, but an app that gets one another way, for example from
a notification it sent over D-Bus itself, had no way to hand it over. The new
method sets the token that the next window activation uses.

* fix: document the X11 behavior of app.setActivationToken() and harden its spec

X11 uses the same token as the startup notification ID of the next window that
is created or activated, so the method is not a no-op there. The spec now sets
the token before its window is shown, reads the activation request as it
appears and fails if the child exits instead of skipping.

* docs: say what the token is on X11 in the parameter description
2026-10-22 17:42:23 +00:00
..
2026-03-12 14:43:39 +01:00
2026-10-15 10:19:10 -04:00

Official Guides

Please make sure that you use the documents that match your Electron version. The version number should be a part of the page URL. If it's not, you are probably using the documentation of a development branch which may contain API changes that are not compatible with your Electron version. To view older versions of the documentation, you can browse by tag on GitHub by opening the "Switch branches/tags" dropdown and selecting the tag that matches your version.

FAQ

There are questions that are asked quite often. Check this out before creating an issue:

Guides and Tutorials

Getting started

Learning the basics

Advanced steps

Detailed Tutorials

These individual tutorials expand on topics discussed in the guide above.


API References

Custom Web Features:

Modules for the Main Process:

Modules for the Renderer Process (Web Page):

Modules for Both Processes:

Development

See development/README.md