Bug 892757 - Also listen for events with -actorId in Style Editor client; r=dcamp

--HG--
extra : amend_source : b51769b6dd414ffeab01e8066074c0ee05d64ef3
This commit is contained in:
Heather Arthur 2013-07-12 13:28:47 -07:00
parent 036c713213
commit 55ba836f14

View File

@ -228,6 +228,12 @@ let StyleSheet = function(form, debuggee) {
this._client.addListener("propertyChange", this._onPropertyChange);
this._client.addListener("styleApplied", this._onStyleApplied);
// Backwards compatibility
this._client.addListener("sourceLoad-" + this._actor, this._onSourceLoad);
this._client.addListener("propertyChange-" + this._actor, this._onPropertyChange);
this._client.addListener("styleApplied-" + this._actor, this._onStyleApplied);
// set initial property values
for (let attr in form) {
this[attr] = form[attr];
@ -324,5 +330,9 @@ StyleSheet.prototype = {
this._client.removeListener("sourceLoad", this._onSourceLoad);
this._client.removeListener("propertyChange", this._onPropertyChange);
this._client.removeListener("styleApplied", this._onStyleApplied);
this._client.removeListener("sourceLoad-" + this._actor, this._onSourceLoad);
this._client.removeListener("propertyChange-" + this._actor, this._onPropertyChange);
this._client.removeListener("styleApplied-" + this._actor, this._onStyleApplied);
}
}