How do I add an event listener for the "scroll" event?

How can I add an event listener for the “scroll” event? I tried the following (and some other stuff to be honest), and it didn’t work:

    requireApiVersion("0.15.0") ? activeDocument = activeWindow.document : activeDocument = window.document;

    this.registerDomEvent(activeDocument, "scroll", () => console.log("scrolling..."));

Lots of examples on Github. I searched for onscroll.

You have to be logged into Github to use the above search.

Thank you, none of them helped, but searching for registerdomevent scroll did. The thing I was missing was that the event is called “wheel” instead of “scroll” :man_facepalming: .

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.