Electron dom for noobs


hi, i am trying to learn how to use electron. i cant seem to detect a variable in one script that points to a text input box. here is the html page :

      <link rel="stylesheet" type="text/css" href="../Scripts/Css/Home.css">
      <script src='../Scripts/Js/Login.js'></script>
    <form id="Login">
    <input id="LoginBox" placeholder="log in" type="text">


and here is my login.js :

var login = document.querySelector("#LoginBox");
  if (login){

im stuck, because i keep getting false in the console. ive searched around, and i dont want to use an over engineered approach to solving this please.( forgive the preview, i dont know how to use this fancy schmancy formating.)


nevermind, i had a stroke of genius and realized that the login.js script tag should be at the very bottom of the page. wheew… to think i even suspected black magic at work.