Skip to content

Cross-browser extension article update#30228

Merged
rebloor merged 16 commits into
mdn:mainfrom
rebloor:cross-browser-article-update
Dec 11, 2023
Merged

Cross-browser extension article update#30228
rebloor merged 16 commits into
mdn:mainfrom
rebloor:cross-browser-article-update

Conversation

@rebloor

@rebloor rebloor commented Nov 13, 2023

Copy link
Copy Markdown
Contributor

Description

This update includes:

  • removing the note about the content being incomplete, and replacing it with one mentioning Manifest V2 and Manifest V3
  • note about Chrome's MV3 support for promises.
  • section about the differences between content script execution contexts
  • section mentioning differences in background script support.

Related issues and pull requests

Fixes #20779

@rebloor rebloor added the Content:WebExt WebExtensions docs label Nov 13, 2023
@rebloor rebloor self-assigned this Nov 13, 2023
@rebloor rebloor requested a review from a team as a code owner November 13, 2023 01:48
@rebloor rebloor requested review from jpmedley and removed request for a team November 13, 2023 01:48
@github-actions

github-actions Bot commented Nov 13, 2023

Copy link
Copy Markdown
Contributor

@jpmedley jpmedley left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You write really clean prose. That makes it look like I was only reviewing for Chrome-related stuff, which I was not.


- _Promises_, the proposed standard for the extensions API used by Firefox and Safari.
- _Callbacks_, used by Chrome, Edge, and Opera.
> **Note:** As of November 2023, the Chrome documentation notes that "support has been added to most methods, though callbacks are still supported as an alternative. (We will eventually support promises on all appropriate methods.)"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This note may not be needed. I will get you an answer.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @jpmedley I'll await your update. Has a bit of a knock-on impact into other work too so would be good to know.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's drop this note. I have suggested an edit to clarify the callback support, and the "(We will eventually support promises on all appropriate methods.)" remark is unnecessary.

The vast majority of Chrome extension APIs support Promises now.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Dropping this seems right. Chrome's promise work will be done this quarter. The phrase 'all appropriate methods' is right. There are places where callbacks are appropriate and will remain in use.

@rebloor rebloor requested a review from Rob--W November 13, 2023 22:21
Co-authored-by: Joe Medley <jmedley@google.com>

@Rob--W Rob--W left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Here is a review of the content that has changed. I haven't reviewed the full (existing) article yet (i.e. the part that does not show up in the diff), but will do that once the pending changes have been resolved.


- _Promises_, the proposed standard for the extensions API used by Firefox and Safari.
- _Callbacks_, used by Chrome, Edge, and Opera.
> **Note:** As of November 2023, the Chrome documentation notes that "support has been added to most methods, though callbacks are still supported as an alternative. (We will eventually support promises on all appropriate methods.)"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's drop this note. I have suggested an edit to clarify the callback support, and the "(We will eventually support promises on all appropriate methods.)" remark is unnecessary.

The vast majority of Chrome extension APIs support Promises now.

Co-authored-by: Rob Wu <rob@robwu.nl>
rebloor and others added 3 commits November 15, 2023 11:09
…r_extension/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
jpmedley and others added 2 commits November 16, 2023 07:10
…r_extension/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@rebloor

rebloor commented Nov 16, 2023

Copy link
Copy Markdown
Contributor Author

@Rob--W anything outstanding from your POV

@jpmedley

Copy link
Copy Markdown
Collaborator

This has a merge conflict. I'm going to be out of the office for the next week, so please request merge from someone else.

Thank you.

Co-authored-by: Rob Wu <rob@robwu.nl>
@rebloor rebloor requested a review from Rob--W November 20, 2023 01:13

@Rob--W Rob--W left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good to merge with one change, mainly due to the uncertainty about Chrome 121 having been resolved (copy edit as you see fit).

@rebloor rebloor merged commit a1a5869 into mdn:main Dec 11, 2023
@rebloor rebloor deleted the cross-browser-article-update branch December 11, 2023 21:37
dipikabh pushed a commit to dipikabh/content that referenced this pull request Jan 17, 2024
* Cross-browser extension article update

* grammar fix

* Apply suggestions from review

Co-authored-by: Joe Medley <jmedley@google.com>

* Apply suggestions from review

Co-authored-by: Rob Wu <rob@robwu.nl>

* Adding embedded section links

* Removed Chrome promise support evolution note

* Update files/en-us/mozilla/add-ons/webextensions/build_a_cross_browser_extension/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update files/en-us/mozilla/add-ons/webextensions/build_a_cross_browser_extension/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* async handling update

* Further async clarification

* Apply suggestions from review

Co-authored-by: Rob Wu <rob@robwu.nl>

* Feedback re Chrome support

Co-authored-by: Rob Wu <rob@robwu.nl>

---------

Co-authored-by: Joe Medley <jmedley@google.com>
Co-authored-by: Rob Wu <rob@robwu.nl>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebExt WebExtensions docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify sharing objects with page scripts impact on build a cross browser extension

3 participants