code: function manageWindow(tabliFolderId, tabWindow, title, cb) {
    // and write out a Bookmarks folder for this newly managed window:
    if (!tabliFolderId) {
      alert('Could not save bookmarks -- no tab manager folder');
    }
  
    var windowFolder = { parentId: tabliFolderId,
      title: title
    };
    chrome.bookmarks.create(windowFolder, function (windowFolderNode) {
      // console.log( "succesfully created bookmarks folder ", windowFolderNode );
      // console.log( "for window: ", tabWindow );
  
      // We'll groupBy and then take the first item of each element of the sequence:
      var uniqTabItems = tabWindow.tabItems.groupBy(function (ti) {
        return ti.url;
      }).toIndexedSeq().map(function (vs) {
        return vs.get(0);
      }).toArray();
  
      var bookmarkActions = uniqTabItems.map(function (tabItem) {
        function makeBookmarkAction(v, bmcb) {
          var tabMark = { parentId: windowFolderNode.id, title: tabItem.title, url: tabItem.url };
          chrome.bookmarks.create(tabMark, bmcb);
        }
  
        return makeBookmarkAction;
      });
  
      utils.seqActions(bookmarkActions, null, function () {
        // Now do an explicit get of subtree to get node populated with children
        chrome.bookmarks.getSubTree(windowFolderNode.id, function (folderNodes) {
          var fullFolderNode = folderNodes[0];
  
          // We'll retrieve the latest chrome Window state and attach that:
          chrome.windows.get(tabWindow.openWindowId, { populate: true }, function (chromeWindow) {
            // Hack:  Chrome may think focus has moved to the popup itself, so let's just
            // set chromeWindow.focused to last focused state (tabWindow.focused)
            var focusedChromeWindow = Object.assign({}, chromeWindow, { focused: tabWindow.focused });
            cb(function (state) {
              return state.attachBookmarkFolder(fullFolderNode, focusedChromeWindow);
            });
          });
        });
      });
    });
  }
docs: /*
  save the specified tab window and make it a managed window