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

@@ -39,7 +39,7 @@ export function jsonp(url, callback, opt_errback, opt_callbackParam) {
cleanup();
callback(data);
};
document.getElementsByTagName('head')[0].appendChild(script);
document.head.appendChild(script);
}
export class ResponseError extends Error {