Call services from frontend with fire-dom-event

This commit is contained in:
2022-07-18 23:23:15 +00:00
parent 7c6e749c3f
commit 8fe408bcc6
5 changed files with 21 additions and 19 deletions

View File

@@ -52,6 +52,12 @@ export const ServicesMixin = (SuperClass) => {
});
});
}
document.body.addEventListener("ll-custom", (ev: CustomEvent) => {
if (ev.detail.browser_mod) {
this._service_action(ev.detail.browser_mod);
}
});
}
async _service_action({ service, data }) {