btw, I had a try to call window.addEventListener with invalid parameter, no any error message is prompted.

But anyway, it is a good practice to validate the parameter firstly.