w3c / webextensions

Charter and administrivia for the WebExtensions Community Group (WECG)
Other
576 stars 50 forks source link

Expose chrome.runtime.inIncognitoContext #611

Open tophf opened 1 month ago

tophf commented 1 month ago

Supersedes #605 with a different solution and an explanation why workarounds are problematic.

Goal: expose chrome.runtime.inIncognitoContext in all contexts.

Optional goal: deprecate chrome.extension.inIncognitoContext

Immediately beneficial use case: userscripts of extensions in the default spanning incognito mode.

The problem doesn't concern the split mode extensions which can embed the value in the code of the userscripts registered just for the incognito mode.

The workaround for a userscript is problematic as it requires an additional "isolated world":