Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #275: Convert AboutCompat.jsm to an ES module. #323

Merged
merged 1 commit into from Sep 13, 2023

Conversation

Standard8
Copy link
Contributor

This converts AboutCompat.jsm to an ES module and changes the necessary support infrastructure.

I have not tested it on android, so I'm not certain it will work there. Performing the export on desktop and running the tests seems to work fine.

Comment on lines -9 to -11
const Services =
globalThis.Services ||
ChromeUtils.import("resource://gre/modules/Services.jsm").Services;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to note: Services has been a global in Extension APIs for a while now, and shouldn't be necessary to be manually imported:

https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/basics.html#globals-available-in-the-api-scripts-global

Copy link
Collaborator

@wisniewskit wisniewskit left a comment

Choose a reason for hiding this comment

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

Good idea, thanks!

@wisniewskit wisniewskit merged commit 3c8ff2a into mozilla-extensions:main Sep 13, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants