MZ Return the id of parallel/autorun events that is active in Javascript

I want to know how to get the list of event IDs that is currently active in the map.
JavaScript:
function thisWillGetTheActiveEventsID(arrayIDs)
{
    for(var i = 0; i < arrayIDs.length; i++)
    {
        console.log(arrayIDs[i]);
    }
}
Thanks!

Edit: I just realized I can just set a game variable with the event's ID at the start of the parallel/autorun event. But I hope there's a better way than this.
Hi there!
For common events, there is no way by default. If you execute a common event inside another event, it will just add the common event list commands into that regular event. Meaning that the ID will be from the event itself, not the common event.

But if you want to discover the ID of a common event(parallel/autorun) You can either use a variable to add a id for it or a switch set to ON when it starts and OFF when it overs.

Original thread: https://forums.rpgmakerweb.com/threads/return-the-id-of-parallel-autorun-events-that-is-active-in-javascript.148492/