javascriptfirefoxmozilla

How to set custom cookieStoreId using contextualIdentities.create()?


Using the following code I can create custom contextual identity in Firefox (also see docs). My question is: how do I set my own name for cookieStoreId property. Firefox will always name it like firefox-container-XY by default.

function onCreated(context) {
  console.log(`New identity's ID: ${context.cookieStoreId}.`);
}

browser.contextualIdentities.create({
  name: "my-thing",
  color: "purple",
  icon: "briefcase"
}).then(onCreated);

Is it even possible?


Solution

  • It is not possible because cookieStoreId name is always auto-assigned by Firefox.