Our team has been working on building a Trello Power Up, and we’re running into some issues trying to respond to cross-board navigation in Trello. We have some background processing that occurs in our plugin, and we display its progress in a Board Bar. When that processing is complete it results in a comment that gets posted to the relevant card. if you end up navigating away, it will interrupt the processing and cause it to not complete. We have a
window.onbeforeunload event listener that prompts the user in the case where the browser is closed or navigates to an external URL. We’re also handling the case where the Board Bar gets closed prematurely with a callback attached there.
However, when navigating to another Trello URL, it doesn’t trigger a
beforeunload event or trigger the Board Bar closed-callback. Is there some other way we could respond to this navigation change?
It would be best if there was at least some event we could respond to, that way we could clean up the background processing task instead of just having it error when it tries to complete on the wrong board.