Bug 1896783 - don't rely on the ReportBrokenSite object existing as a window property, r=twisniewski,pbz,webcompat-reviewers
Unfortunately the addition in browser-siteProtections.js still makes this a variable on the browser window, but refactoring the contents of that file to be module-based is a separate effort. Differential Revision: https://phabricator.services.mozilla.com/D210434
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
ContentBlockingAllowList:
|
||||
"resource://gre/modules/ContentBlockingAllowList.sys.mjs",
|
||||
ReportBrokenSite: "resource:///modules/ReportBrokenSite.sys.mjs",
|
||||
SpecialMessageActions:
|
||||
"resource://messaging-system/lib/SpecialMessageActions.sys.mjs",
|
||||
});
|
||||
@@ -1376,6 +1377,8 @@ var gProtectionsHandler = {
|
||||
if (!this._protectionsPopup) {
|
||||
let wrapper = document.getElementById("template-protections-popup");
|
||||
this._protectionsPopup = wrapper.content.firstElementChild;
|
||||
this._protectionsPopup.addEventListener("popupshown", this);
|
||||
this._protectionsPopup.addEventListener("popuphidden", this);
|
||||
wrapper.replaceWith(wrapper.content);
|
||||
|
||||
this.maybeSetMilestoneCounterText();
|
||||
|
||||
Reference in New Issue
Block a user