Can browser extension permission requests be cancelled?

You can easily request a permission with browser.permissions.request and the user can accept or decline it.

Now the browser extension’s UI (e.g. popup or options page) stays visible and usable for the user, however. Which leads to an UX problem.

Because if you notice another user interaction, which e.g. invalidates the original reason you had to request the permission from the user; you may want to cancel/decline the permission request by yourself, as a developer.

Otherwise users have already declined/reverted what caused the permission request, but still have this annoying popup.
If the user accepts it, they have accepted a permission they don’t need; if they decline, they had at least two clicks to do.

Cross-posted to Stackoverflow.

In theory other user interactions close the doorhanger though.

Maybe usual web notifications, but WebExtension permissions don’t. At least when requested from the options page.

Users can decline it only via a button or with Esc.