Question regarding onload

If I have an external .js file which my HTML file references/triggers, and inside that external .js file, I put all my coding inside a windows.onload = function(){}, will that onload know which html file it is supposedly waiting for the contents of to load, or would that onload have to be inside the html file (be in the same file that it is waiting to fully load the contents for)?

Figured it out. Nevermind…