Prevent extension pages from closing when extension is updated

When I update an extension (by opening the XPI in Developer Edition), any tabs that are currently showing extension pages (moz-extension:///) for that extension get closed, and I have to re-open them with “Recently closed tabs”. I would rather those tabs just get reloaded instead. Is there any way to prevent these tabs from closing? I could host a blank page externally and inject a content script into it instead of using an extension page, but I don’t want an external dependency.

Yeah, that was always something that annoyed me as well, so I just spent 2,5 hours creating this: https://gist.github.com/NiklasGollenstede/63a6099d97e82ffe0cc064d4d4d82b62#file-readme-md

It isn’t quite what you were asking for (as the README explains that doesn’t work), but it comes close and so far works pretty well for me.