i have a JS file with a function named "login" . I also have a html file but the JS cant be linked via <script> because it would destory the purpose of my script. The JS gets executed via server.
Now i wanted to write :document.addEventListener('DOMContentLoaded', login); but i cant use document because there is no document the JS could access.
Now my question is, if it is possible to access the document of a html file altought the JS isnt attached to it?