Communication between the pref.js window and extension.js

In my Gnome shell extension, I have a popup menu item that opens the prefs window when clicked like so:

js
prefsItem.connect("activate", () => {
  ExtUtils.openPrefs();
});

Gnome shell throws an error when I click the menu item, hence call ExtUtils.openPrefs, while the preferences window is already open. I understand the prefs window runs in a separate process. One way of knowing whether the prefs window is open is by updating settings that the extension can check before calling ExtUtils.openPrefs. This seems like an overkill. Is there any other way the prefs process can comunicate with the extension?