made for Nordcraft

addListener

This action adds a generic JavaScript listener to a defined element. This is useful if you want to subscribe to an event dynamically or need access to specific events not exposed in the library.

Reference

    • Arguments

      • element
        element
        /
        default: -

        The element that the listener should be attached to.

      • listener
        string
        /
        default: -

        The name of the listener (e.g. "touchstart").

    • Events

      • onTrigger

        Is triggered when the attached listener triggers.