togglePalettes() equivalent in UXP?

Is there a UXP command equivalent for the extenscript togglePalettes()?

One thing I have found is that scripting runs much faster with the Photoshop panels hidden. In some cases it is nearly twice as fast. Because of that, I used togglePalettes() a lot in my extendscript batch processors.

I did some timed tests with UXP by using the tab key to hide all of the panels and it is the same as extendscript where hiding the panels really speeds it up.

I can always instruct my users that they can hide the panels with the tab key. however, it would be nice to have the plugin do it automatically when running the batch processes.

Did you ever find a good option for this?

The only way I found to do it is through running a small 1 line JSX script from UXP and putting the small JSX file in the UXP plugin folder.

I opted to not do this however. The issue is that I can’t reliably find a way to catch all UXP errors and always run the script to toggle the panels back on for any and all cases of a UXP error… or user abort.

So I didn’t want user to be left without panels. I think that 99% of the users wouldn’t know that the tab key would open the panels back up when that happens.

When I had this with an all JSX program, it was easy to try/catch the entire operation and toggle the panel back on in case of an error or user abort.

Also, Adobe has stated that running JSX from UXP is not recommended and it is hard to say how long JSX will be available anyway in the long term.

Gotcha, I guess I will have to skip it. Bummer.
Thanks!