-
Notifications
You must be signed in to change notification settings - Fork 263
Bug 744514 - Observer callbacks get topic as argument #592
Conversation
@@ -59,7 +59,8 @@ const Observer = Class({ | |||
this.listener({ | |||
type: topic, | |||
subject: subject, | |||
data: data | |||
data: data, | |||
topic: topic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
topic
is already exposed via type
property, is this really necessary ?
Gozala, this should be better. |
let uu = function() uuid().number.slice(1,-1); | ||
|
||
var counter = {}; | ||
let uuids = [uu() for (ii in [0,1,2,3,4,5])]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please don't use comprehensions ? We banned them as it's was not obvious for people that are unfamiliar and they don't buy us much to be worth the traideoffs.
let uuids = Array(5).map(uu)
Is both shorter and simpler.
Use case: observe on ("*"). https://bugzilla.mozilla.org/show_bug.cgi?id=744514 (tests included for 4th argument)
Any progress on this one? |
Hey I'm really sorry for the delay, please mention @Gozala on the threads where you expect me to followup that way it'll be in the top of my message queue and I'll be getting to it sooner 😉 I think it's ready to go, it just won't merge through github interface as pr is out of date I presume. Could you please update and land it just make sure to add Thanks |
@@ -6,6 +6,7 @@ const observers = require("sdk/deprecated/observer-service"); | |||
const { Cc, Ci } = require("chrome"); | |||
const { Loader } = require("sdk/test/loader"); | |||
const { PlainTextConsole } = require("sdk/console/plain-text"); | |||
const {uuid} = require('sdk/util/uuid'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: We put spaces after brackets and try to be consistent in quotes at least with in the file.
At this point system/events can be used with a |
Use case: observe on ("*").
https://bugzilla.mozilla.org/show_bug.cgi?id=744514