I have a process which creates a placeholder BO, opens a tab and then displays the placeholder in a new tab.
I would like to run a process to clean up that placeholder when the tab closes, but you can't run a process on closing a tab, so the next best alternative would be to prevent the user from closing the tab with the close cross on the tab to force them to use an operation button to clean up and then close the tab, but there is no flag to hide the close cross, so I'm guessing a script is required.
I don´t have the whole solutions for you but both can be done. The process when closing tab can be done if you attach an JS event listener to it so when the cross is clicked, the process is executed. The hide cross can be done via CSS. The problem with both hacks is, how can you target 1 cross and not all crosses in the app. You can possibly find a unique selector for the cross so you target only that particular one and then you can use both of the solutions above.