Skip to content

Add notes for action.openPopup API in Firefox#18202

Merged
queengooborg merged 3 commits intomdn:mainfrom
oliverdunk:open-popup
Nov 23, 2022
Merged

Add notes for action.openPopup API in Firefox#18202
queengooborg merged 3 commits intomdn:mainfrom
oliverdunk:open-popup

Conversation

@oliverdunk
Copy link
Contributor

Summary

Updates the compatibility information for the WebExtension action.openPopup API following the changes in https://phabricator.services.mozilla.com/D139796. In particular, Firefox now has support for a windowId parameter and the user gesture requirement has been removed behind a preference currently enabled in Nightly.

I have a similar PR coming to update the main MDN page, which this one is intended to land at the same time as.

Test results and supporting details

Original bug (including windowId support): https://bugzilla.mozilla.org/show_bug.cgi?id=1755763

Removing preference: https://bugzilla.mozilla.org/show_bug.cgi?id=1799344

I've been working on these changes with @Rob--W.

Related issues

NA

@github-actions github-actions bot added the data:webext Compat data for Browser Extensions. https://developer.mozilla.org/Add-ons/WebExtensions label Nov 13, 2022
"version_added": "101"
"version_added": "101",
"notes": [
"Must be called from inside the handler for a <a href='https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/User_actions'>user action</a>. From Firefox 108, this restriction has been lifted behind a preference. See <a href='https://bugzil.la/1799344'>bug 1799344</a>.",
Copy link
Member

Choose a reason for hiding this comment

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

Ideally, I'd just shorten this to "Since Firefox 108, user interaction is no longer required to call this API."

Now, since the pref is required, maybe also ... when the ... pref is set (<a ...>bug xxx</a>).

When the pref is finally flipped, we could do something like this:

"notes": [
"Since Firefox 86, the <code>redirect_url</code> parameter now supports a loopback address, see <a href='https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/identity#getting_the_redirect_url'>Getting the redirect URL</a> for details.",
"Between Firefox 75 and Firefox 86, the <code>redirect_uri</code> URL parameter must be set to the URL returned by <code>identity.getRedirectURL()</code>.",
"Between Firefox 63 and Firefox 75, the <code>redirect_uri</code> URL parameter was optional."
]

... or just keep the minimal simple text from the top of this comment, without any reference to a preference, since the preference (flag) would be irrelevant: https://github.com/mdn/browser-compat-data/blob/main/docs/data-guidelines/index.md#removal-of-irrelevant-flag-data

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback, I pushed a change :)

@queengooborg
Copy link
Contributor

Hey @oliverdunk, I just noticed that this was your first PR for BCD -- welcome to the project (sorry that you weren't welcomed sooner)! If you have any questions, don't hesitate to ask a project peer or owner!

@oliverdunk
Copy link
Contributor Author

Thanks @queengooborg! And apologies for the delay, I’m slowly catching up on responding to feedback 😅

Copy link
Contributor

@queengooborg queengooborg left a comment

Choose a reason for hiding this comment

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

Thank you for the quick changes, let's get this merged!

@queengooborg queengooborg merged commit 1f95c5d into mdn:main Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:webext Compat data for Browser Extensions. https://developer.mozilla.org/Add-ons/WebExtensions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants