This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
import { M as t, b as n } from "./copilot-ppBO0zjz.js";
|
||||
class o extends t {
|
||||
constructor() {
|
||||
super(...arguments), this.eventBusRemovers = [], this.messageHandlers = {};
|
||||
}
|
||||
createRenderRoot() {
|
||||
return this;
|
||||
}
|
||||
onEventBus(e, s) {
|
||||
this.eventBusRemovers.push(n.on(e, s));
|
||||
}
|
||||
disconnectedCallback() {
|
||||
super.disconnectedCallback(), this.eventBusRemovers.forEach((e) => e());
|
||||
}
|
||||
onCommand(e, s) {
|
||||
this.messageHandlers[e] = s;
|
||||
}
|
||||
handleMessage(e) {
|
||||
return this.messageHandlers[e.command] ? (this.messageHandlers[e.command].call(this, e), !0) : !1;
|
||||
}
|
||||
}
|
||||
export {
|
||||
o as B
|
||||
};
|
||||
Reference in New Issue
Block a user