Automatically add extra capabilities to policyTypesMap.

This commit is contained in:
hackademix 2024-08-26 11:40:10 +02:00
parent 8e6ef7aefd
commit 74213aa8ee
No known key found for this signature in database
GPG Key ID: 231A83AFDA9C2434
1 changed files with 7 additions and 1 deletions

View File

@ -41,7 +41,13 @@ var RequestGuard = (() => {
other: "",
};
Object.assign(policyTypesMap, {"webgl": "webgl"}); // fake types
// add "fake" mappings for reporting capabilities handled outside of RequestGuard
for (const cap of Permissions.ALL) {
if (!(cap in policyTypesMap)) {
policyTypesMap[cap] = cap;
}
}
const TabStatus = {
map: new Map(),
_originsCache: new Map(),