Skip to content

Commit bbc32e1

Browse files
committed
Bug 1817016 - Convert JSM in browser/components/prompts to ESM. r=kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D173078
1 parent a25fe34 commit bbc32e1

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

browser/components/prompts/PromptCollection.jsm renamed to browser/components/prompts/PromptCollection.sys.mjs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,13 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
"use strict";
6-
7-
var EXPORTED_SYMBOLS = ["PromptCollection"];
8-
9-
const { XPCOMUtils } = ChromeUtils.importESModule(
10-
"resource://gre/modules/XPCOMUtils.sys.mjs"
11-
);
5+
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
126

137
/**
148
* Implements nsIPromptCollection
159
* @class PromptCollection
1610
*/
17-
class PromptCollection {
11+
export class PromptCollection {
1812
confirmRepost(browsingContext) {
1913
let brandName;
2014
try {

browser/components/prompts/components.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Classes = [
66
{
77
'cid': '{7913837c-9623-11ea-bb37-0242ac130002}',
88
'contract_ids': ['@mozilla.org/embedcomp/prompt-collection;1'],
9-
'jsm': 'resource:///modules/PromptCollection.jsm',
9+
'esModule': 'resource:///modules/PromptCollection.sys.mjs',
1010
'constructor': 'PromptCollection',
1111
},
1212
]

browser/components/prompts/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ with Files("**"):
66
BUG_COMPONENT = ("Toolkit", "Notifications and Alerts")
77

88
EXTRA_JS_MODULES += [
9-
"PromptCollection.jsm",
9+
"PromptCollection.sys.mjs",
1010
]
1111

1212
XPCOM_MANIFESTS += [

0 commit comments

Comments
 (0)