Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
23 lines
434 B
JavaScript
Executable file
23 lines
434 B
JavaScript
Executable file
/* exported MockRadio */
|
|
'use strict';
|
|
|
|
var MockRadio = {
|
|
_enabled: false,
|
|
_events: {},
|
|
set enabled(value) {
|
|
this._enabled = value;
|
|
},
|
|
get enabled() {
|
|
return this._enabled;
|
|
},
|
|
addEventListener: function(key, callback) {
|
|
if (!this._events[key]) {
|
|
this._events[key] = [];
|
|
}
|
|
this._events[key].push(callback);
|
|
},
|
|
mTeardown: function() {
|
|
this._enabled = false;
|
|
this._events = {};
|
|
}
|
|
};
|