I'm working on a plugin that uses Zotero 7's new preference pane functionality. Within my preference pane code, I'm using `Zotero.Prefs.registerObserver` to observe changes to a preference value. However, I don't know of a way to determine when my pane is unloaded so that I can call `Zotero.Prefs.unregisterObserver`. Because of this, duplicate pref observers continue to get added as I open and close the Zotero preferences window.
I've been trying to implement a workaround using MutationObserver, but I haven't had any luck yet.
Would it be possible to add an `unload` event that's sent to the preference pane similar to how `load` is
currently?
Thanks!
David