'Is it possible to move Google Chrome tab between windows? got it :)

Edit: Thank you wOxxOm. It worked :) chrome.tabs.move(XXX,{windowId:YYY, index:ZZZ}) Somehow I did not see the move option :(

I am writing simple Google Chrome web extension and I want to manipulate the tabs and windows. I actually want to be able to move a tab between the windows. The tab will have programatically spawned dynamic page, that I do not want to reload. The windowId is not listed in the modifiable properties chrome.tabs.

Am I missing something or it is currently not supported? What are the workarounds?

p.s. In extreme case also powershell or .Net might be acceptable (I have total control of the target PC). Currently spawning clearly distinguishable iframe over the web pages (background script injected and message listener) but the iframe gets reloaded, which I want to avoid.

p.p.s. Workaround might be to detect the currently active window and spawn new tab in the active window (if required), but this would require to save the page state, close the inactive tab and spown new one in the active window (this should be possible)

p.p.p.s. Main target is Google Chrome, but want it also for Microsoft Edge. Hopefully also for other browsers.

Edit: Thank you wOxxOm. It worked :) chrome.tabs.move(XXX,{windowId:YYY, index:ZZZ}) Somehow I did not see the move option :(



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source