How to catch the page change event in the document while scrolling it inside the viewer?

Which product are you using?
PDF.js Express Plus

PDF.js Express Version
8.1.0

Detailed description of issue
I need to get the page number from a page change event when I scroll through the document. Is there an in built function to do that? I just need to need to get the page number when page is scrolled/changed.

Thank you!

Expected behaviour
{Provide a screenshot or description of the expected behaviour}

Does your issue happen with every document, or just one?
{Answer here}

Link to document
{Provide a link to the document in question if possible}

Code snippet
{Provide a relevant code snippet}

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hey!

You can use the ‘pageNumberUpdated’ event like so:

instance.Core.documentViewer.addEventListener('pageNumberUpdated', (pageNumber) => {
    console.log(pageNumber)
  })

Thanks,
Logan