API to reload plugin

API to reload my plugin.

Use Case
I have a few cases where I’m getting errors. I’ve been able to wrap them in try catch blocks but with a few errors my plugin needs to be reloaded. If I encounter an error I would like to show an error icon in the panel and when the user clicks on it, it reloads the plugin.

Thanks for submitting the request. We will review them based on the number of votes

Try using window.location.reload() and see if that works for your needs.

Wow, had no idea. A bit drastic, no? :wink:

Agreed that it should be a last resort. :slight_smile: Also, doesn’t actually seem to work – I just tried it in a panel, and it just blanks it.

So, in this case, ignore me – I’ll blame the “getting-back-from-vacay-brain”.

What version of XD / OS does this work on? I just tried on my machine, and clicking the title didn’t do anything.

1 Like