Monkey patch Firefox Addon SDK's Tab class with a method for moving tabs to other windows.
In you addon folder run
npm i jetpack-tab-setwindow --save
In you addon code include
Now you can call
setWindow(window, index) on any SDK tab.
const TABS = ;// Move first tab to the end of second tab's windowTABS0;
This library uses Addon SDK low-level API, which is not encouraged.
Here is a note from Mozilla's SDK Add-ons website:
Note that directly accessing XUL objects and web content like this means you're no longer protected by the compatibility guarantees made by the SDK's high-level APIs. In particular, your code might not work with multiprocess Firefox.
So use with care.
Tested with Firefox 44 and Nightly 47.