Is there one?
Yes, you can use: this.pane
It will return "B" when the bookmarks panel is open, and something else if it's not. For example, "T" if the pages thumbnails panel is open, or "N" if no panels are open.
Thanks try, worked great. Where would that info be? Somewhere in the dev kit, maybe? I didn't see it in the api reference.
It's an undocumented feature, actually, so use it with care.