Thank you very much. Yes, it was most likely the error. I am running into another issue now ("ScrollTrigger is not defined") which is what was the issue I had before (which led me to move away from the addEventListener - nonetheless, I had not realized I was overwriting the window.onload, thank you for point that out).
So I will mark your reply as a solution, since my issue now is another one.
Thank you!