aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/logging-front.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-04-28 00:39:52 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-06-05 14:46:50 +0200
commitcb82da27fc37ebe74aa9678506e72eb1a7308ca3 (patch)
tree743209aab4c515fd62c57c7f7982347ff760dec6 /data/lib/logging-front.js
parent680ad8225d72703dcdc98a128c7dd4f408a3018b (diff)
downloadbugzilla-triage-cb82da27fc37ebe74aa9678506e72eb1a7308ca3.tar.gz
Use self.on and self.postMessage instead of global on and postMessage.
The reason is https://bugzilla.mozilla.org/show_bug.cgi?id=635748 and effort to save the world from global variables in content scripts.
Diffstat (limited to 'data/lib/logging-front.js')
-rw-r--r--data/lib/logging-front.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/data/lib/logging-front.js b/data/lib/logging-front.js
index 8d383e8..b8343a4 100644
--- a/data/lib/logging-front.js
+++ b/data/lib/logging-front.js
@@ -24,7 +24,7 @@ function addLogRecord() {
var bugNo = getBugNoFromURL(window.location.href);
rec.key = dateStr + "+" +
urlStr + "+" + bugNo;
- postMessage(new Message("AddLogRecord", rec));
+ self.postMessage(new Message("AddLogRecord", rec));
}
return rec;
}
@@ -57,17 +57,17 @@ function setUpLogging () {
// (id, text, parent, callback, params, before, covered, accesskey)
createDeadLink("generateTSButton", "Generate TS", additionalButtons,
function(evt) {
- postMessage(new Message("GenerateTS"));
+ self.postMessage(new Message("GenerateTS"));
}, [], "dash", "li");
createDeadLink("clearLogs", "Clear TS", additionalButtons,
function(evt) {
- postMessage(new Message("ClearTS"));
+ self.postMessage(new Message("ClearTS"));
}, [], "dash", "li");
createDeadLink("importTSButton", "Import TS", additionalButtons,
function(evt) {
- postMessage(new Message("ImportTS"));
+ self.postMessage(new Message("ImportTS"));
}, [], "dash", "li");
/* TODO