Skip to content
Snippets Groups Projects
Commit ed504deb authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Dispatch the event from the element itself.

So we can use it directly in lit-element templates and don't have to
add an event handler to window etc.
parent 5863aede
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,7 @@ class LanguageSelect extends LitElement {
bubbles: true,
detail: {'lang': this.lang},
});
window.dispatchEvent(event);
this.dispatchEvent(event);
i18n.changeLanguage(this.lang);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment