Use documentElement instead of getElementById

Use documentElement to get the root <html> element instead of adding an id to
the root element.
pull/5685/head
Aidan Gauland 2017-11-26 13:46:47 +13:00
parent 43b3c013f2
commit c4dc59dc41
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<!doctype html>
<html id="mx_PageRoot" lang="en" style="height: 100%;">
<html lang="en" style="height: 100%;">
<head>
<meta charset="utf-8">
<title>Riot</title>

View File

@ -382,7 +382,7 @@ async function loadLanguage() {
}
try {
await languageHandler.setLanguage(langs);
document.getElementById("mx_PageRoot").setAttribute("lang", languageHandler.getCurrentLanguage());
document.documentElement.setAttribute("lang", languageHandler.getCurrentLanguage());
} catch (e) {
console.error("Unable to set language", e);
}