mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1126738 - Use arrow functions in browser-data-submission-info-bar.js. r=dao
This commit is contained in:
parent
83f32a9e49
commit
d6f3b8a142
@ -25,11 +25,11 @@ let gDataNotificationInfoBar = {
|
||||
},
|
||||
|
||||
init: function() {
|
||||
window.addEventListener("unload", function onUnload() {
|
||||
window.addEventListener("unload", () => {
|
||||
for (let o of this._OBSERVERS) {
|
||||
Services.obs.removeObserver(this, o);
|
||||
}
|
||||
}.bind(this), false);
|
||||
}, false);
|
||||
|
||||
for (let o of this._OBSERVERS) {
|
||||
Services.obs.addObserver(this, o, true);
|
||||
@ -59,10 +59,10 @@ let gDataNotificationInfoBar = {
|
||||
label: gNavigatorBundle.getString("dataReportingNotification.button.label"),
|
||||
accessKey: gNavigatorBundle.getString("dataReportingNotification.button.accessKey"),
|
||||
popup: null,
|
||||
callback: function () {
|
||||
callback: () => {
|
||||
this._actionTaken = true;
|
||||
window.openAdvancedPreferences("dataChoicesTab");
|
||||
}.bind(this),
|
||||
},
|
||||
}];
|
||||
|
||||
this._log.info("Creating data reporting policy notification.");
|
||||
@ -72,11 +72,11 @@ let gDataNotificationInfoBar = {
|
||||
null,
|
||||
this._notificationBox.PRIORITY_INFO_HIGH,
|
||||
buttons,
|
||||
function onEvent(event) {
|
||||
event => {
|
||||
if (event == "removed") {
|
||||
Services.obs.notifyObservers(null, "datareporting:notify-data-policy:close", null);
|
||||
}
|
||||
}.bind(this)
|
||||
}
|
||||
);
|
||||
// It is important to defer calling onUserNotifyComplete() until we're
|
||||
// actually sure the notification was displayed. If we ever called
|
||||
|
Loading…
Reference in New Issue
Block a user