mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-22 17:47:16 +00:00
Don't share subscriptions between instances
This commit is contained in:
parent
a83167bfe8
commit
fe76ebfab0
1 changed files with 9 additions and 6 deletions
|
|
@ -1,9 +1,6 @@
|
|||
const Group = require("./Group");
|
||||
const MakiObject = require("./MakiObject");
|
||||
|
||||
const onScriptLoadedCallbacks = [];
|
||||
const onSetXuiParamCallbacks = [];
|
||||
|
||||
class System extends MakiObject {
|
||||
/**
|
||||
* getClassName()
|
||||
|
|
@ -15,16 +12,22 @@ class System extends MakiObject {
|
|||
return "System";
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this._onScriptLoadedCallbacks = [];
|
||||
this._onSetXuiParamCallbacks = [];
|
||||
}
|
||||
|
||||
_start() {
|
||||
onScriptLoadedCallbacks.forEach(cb => {
|
||||
this._onScriptLoadedCallbacks.forEach(cb => {
|
||||
cb();
|
||||
});
|
||||
}
|
||||
onScriptLoaded(cb) {
|
||||
onScriptLoadedCallbacks.push(cb);
|
||||
this._onScriptLoadedCallbacks.push(cb);
|
||||
}
|
||||
onSetXuiParam(cb) {
|
||||
onSetXuiParamCallbacks.push(cb);
|
||||
this._onSetXuiParamCallbacks.push(cb);
|
||||
}
|
||||
getScriptGroup() {
|
||||
return new Group();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue