mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-03 03:50:42 +03:00
Use documentElement instead of getElementById
Use documentElement to get the root <html> element instead of adding an id to the root element.
This commit is contained in:
parent
43b3c013f2
commit
c4dc59dc41
2 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html id="mx_PageRoot" lang="en" style="height: 100%;">
|
<html lang="en" style="height: 100%;">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Riot</title>
|
<title>Riot</title>
|
||||||
|
|
|
@ -382,7 +382,7 @@ async function loadLanguage() {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await languageHandler.setLanguage(langs);
|
await languageHandler.setLanguage(langs);
|
||||||
document.getElementById("mx_PageRoot").setAttribute("lang", languageHandler.getCurrentLanguage());
|
document.documentElement.setAttribute("lang", languageHandler.getCurrentLanguage());
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Unable to set language", e);
|
console.error("Unable to set language", e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue