How to get around DOMContentLoaded for navigation?

Hey,

If you’re looking for an event called when page loads, there is api.onPageChange.

api.onPageChange((url, title) => {
   console.log('the page changed to: ' + url + ' and title ' + title);
});

If you’re looking for something else, can you elaborate on what you want to achieve? We could give you a more precise answer.

On a side note, you have a ton of documentation that you might find helpful: Developer Guides - Discourse Meta.

3 Likes