Skip to main content
Inspiring
Dec 13, 2018 2:17 PM UTC
Answered

Detect whether bookmarks panel is open

I have JavaScript that runs best with the bookmarks panel open. I know app.execMenuItem("ShowHideBookmarks"); toggles the bookmarks panel but I've not been able to find a way to detect whether it's already open.

Is there one?

Thank you

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Dec 13, 2018 2:20 PM UTC

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.

3 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Dec 13, 2018 2:20 PM UTC

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.

Translate
KenWKAuthor
Inspiring
Dec 18, 2018 2:07 PM UTC

Thanks try, worked great. Where would that info be? Somewhere in the dev kit, maybe? I didn't see it in the api reference.

Thanks again

Translate
try67
Community Expert
Community Expert
Dec 18, 2018 4:03 PM UTC

It's an undocumented feature, actually, so use it with care.

Translate