Use document.head instead of getElementByTagName

This commit is contained in:
Maximilian Krög
2022-05-15 21:34:26 +02:00
parent 30358b61a9
commit 72d61f887d
6 changed files with 10 additions and 11 deletions

View File

@@ -107,7 +107,7 @@ const createTextStyle = function (feature, resolution, dom) {
const openSans = document.createElement('link');
openSans.href = 'https://fonts.googleapis.com/css?family=Open+Sans';
openSans.rel = 'stylesheet';
document.getElementsByTagName('head')[0].appendChild(openSans);
document.head.appendChild(openSans);
openSansAdded = true;
}
const font = weight + ' ' + size + '/' + height + ' ' + dom.font.value;