gecko/testing/mozmill/jsbridge-2.3.5/jsbridge/extension/resource/modules/events.js

14 lines
338 B
JavaScript
Raw Normal View History

var EXPORTED_SYMBOLS = ["backchannels", "fireEvent", "addBackChannel"];
var backchannels = [];
var fireEvent = function (name, obj) {
for each(backchannel in backchannels) {
backchannel.session.encodeOut({'eventType':name, 'result':obj});
}
}
var addBackChannel = function (backchannel) {
backchannels.push(backchannel);
}