Skip to content

Commit

Permalink
Document changes to action.openPopup API (#22267)
Browse files Browse the repository at this point in the history
* Document changes to action.openPopup API

* Address feedback

---------

Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu <vinyldarkscratch@gmail.com>
Co-authored-by: rebloor <git@sherpa.co.nz>
  • Loading branch information
3 people authored Aug 29, 2023
1 parent 7ade5b1 commit 920293f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,24 @@ Open the browser action's popup.

> **Note:** This API is available in Manifest V3 or higher.
You can only call this function from inside the handler for a [user action](/en-US/docs/Mozilla/Add-ons/WebExtensions/User_actions).
In stable versions of Firefox, you can only call this function from inside the handler for a [user action](/en-US/docs/Mozilla/Add-ons/WebExtensions/User_actions). See [Browser compatibility](#browser_compatibility) for details.

## Syntax

```js-nolint
browser.action.openPopup()
browser.action.openPopup(
options // optional object
)
```

### Parameters

None.
- `details` {{optional_inline}}

- : An object with the following properties:

- `windowId` {{optional_inline}}
- : `integer`. Window to open the popup for. Defaults to the current window.

### Return value

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,24 @@ browser-compat: webextensions.api.browserAction.openPopup

Open the browser action's popup.

You can only call this function from inside the handler for a [user action](/en-US/docs/Mozilla/Add-ons/WebExtensions/User_actions).
In stable versions of Firefox, you can only call this function from inside the handler for a [user action](/en-US/docs/Mozilla/Add-ons/WebExtensions/User_actions). See [Browser compatibility](#browser_compatibility) for details.

## Syntax

```js-nolint
browser.browserAction.openPopup()
browser.browserAction.openPopup(
options // optional object
)
```

### Parameters

None.
- `details` {{optional_inline}}

- : An object with the following properties:

- `windowId` {{optional_inline}}
- : `integer`. Window to open the popup for. Defaults to the current window.

### Return value

Expand Down

0 comments on commit 920293f

Please sign in to comment.