Bug 1817016 - Convert JSM in browser/components/prompts to ESM. r=kpatenio

Differential Revision: https://phabricator.services.mozilla.com/D173078
This commit is contained in:
anwar 2023-03-22 18:16:28 +00:00
parent a25fe342e4
commit bbc32e11de
3 changed files with 4 additions and 10 deletions

View File

@ -2,19 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["PromptCollection"];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
/**
* Implements nsIPromptCollection
* @class PromptCollection
*/
class PromptCollection {
export class PromptCollection {
confirmRepost(browsingContext) {
let brandName;
try {

View File

@ -6,7 +6,7 @@ Classes = [
{
'cid': '{7913837c-9623-11ea-bb37-0242ac130002}',
'contract_ids': ['@mozilla.org/embedcomp/prompt-collection;1'],
'jsm': 'resource:///modules/PromptCollection.jsm',
'esModule': 'resource:///modules/PromptCollection.sys.mjs',
'constructor': 'PromptCollection',
},
]

View File

@ -6,7 +6,7 @@ with Files("**"):
BUG_COMPONENT = ("Toolkit", "Notifications and Alerts")
EXTRA_JS_MODULES += [
"PromptCollection.jsm",
"PromptCollection.sys.mjs",
]
XPCOM_MANIFESTS += [