Fifteen years ago I developed CookiePie [1]. You can see in the video opening two different gmail accounts in different tabs on the same window. This was a relatively successful Firefox extension to use separate and temporary cookie containers in different tabs. Since the Firefox API does include these capabilities, it was a pure hack, but it worked, just it was impossible to cope with every new upgrade of Firefox.
Briefly, the core of the hack was this:
(1) Firefox network hooks were not linked to UI tabs.
(2) So, I traverse all the object graph and find indirect links.
(3) I used those links to connect the network hooks with the UI, even when they conceptually were independent from the FF extension.
I sent the extension to the "Extend Firefox Prize" but didn't came with a single mention.
Briefly, the core of the hack was this:
(1) Firefox network hooks were not linked to UI tabs.
(2) So, I traverse all the object graph and find indirect links.
(3) I used those links to connect the network hooks with the UI, even when they conceptually were independent from the FF extension.
I sent the extension to the "Extend Firefox Prize" but didn't came with a single mention.
[1] https://www.youtube.com/watch?v=1EBkB-Yp-zM