diff --git a/html/app.js b/html/app.js
index 49e1a487..277620dd 100644
--- a/html/app.js
+++ b/html/app.js
@@ -195,7 +195,7 @@ CefSharp.BindObjectAsync(
var $appDarkStyle = document.createElement('link');
$appDarkStyle.rel = 'stylesheet';
$appDarkStyle.href = `app.dark.css?_=${Date.now()}`;
- document.getElementsByTagName('head')[0].appendChild($appDarkStyle);
+ document.head.appendChild($appDarkStyle);
//
// API