Menu context "page_action" in an MV3 extension

I’m converting one of my extensions to Manifest V3, and I’m noticing that a call to browser.menus.create() is now returning an error. This particular call is supposed to set up the context menu items for the page action (the address bar button). I’ve had no issues with it in Manifest V2, but in MV3 it’s now throwing this error:

Uncaught (in promise) Error: Type error for parameter createProperties (Error processing contexts.0: Value “page_action” must either: be one of [“all”, “page”, “frame”, “selection”, “link”, “editable”, “password”, “image”, “video”, “audio”, “launcher”, “bookmark”, “tab”, “tools_menu”], or be one of [“action”]) for menus.create.

And the line where the error is occurring:

browser.menus.create({
  id: "ae-readnext-add-and-close-tab",
  title: browser.i18n.getMessage("mnuCloseTabAfterAdd"),
  contexts: ["page_action"],
});

Is “page_action” no longer supported as a menu context in MV3 extensions?

1 Like

It looks like it’s a new feature, currently only in Nightly 138:

See also: