MCPcopy
hub / github.com/element-hq/element-web / ExampleModule

Class ExampleModule

apps/web/playwright/sample-files/example-module.js:8–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6*/
7
8export default class ExampleModule {
9 static moduleApiVersion = "^1.0.0";
10 constructor(api) {
11 this.api = api;
12
13 this.api.i18n.register({
14 key: {
15 en: "%(brand)s module loading successful!",
16 de: "%(brand)s-Module erfolgreich geladen!",
17 },
18 });
19 }
20 async load() {
21 const brand = this.api.config.get("brand");
22 alert(this.api.i18n.translate("key", { brand }));
23 }
24}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected