List of running applications from Extension Preferences

I developed an extension that renders a simple workspace indicator ego link.

I’m trying to add a setting to ignore some applications. My idea was to display a list of current running applications (so current rendered icons) and add to ignored array in settings on click.

The problem I encountered is that I cannot find a way to get current running windows (and then get application of the window) from prefs.js. I fetch the list with Meta and Shell in extension.js, but they are not available in prefs.js.