window.addEventListener('load', functionName) not working properly

If you like to call some JavaScript whenever a user navigated in Discourse then you can use onPageChange method.

4 Likes