Utils.mjs (506B)
1 /** 2 * Any copyright is dedicated to the Public Domain. 3 * http://creativecommons.org/publicdomain/zero/1.0/ 4 */ 5 6 // This file expectes the SpecialPowers to be available in the scope 7 // it is loaded into. 8 /* global SpecialPowers */ 9 10 import { getCachedUsageForOrigin } from "./StorageUtils.mjs"; 11 12 export const Utils = { 13 async getCachedOriginUsage() { 14 const principal = SpecialPowers.wrap(document).nodePrincipal; 15 const result = await getCachedUsageForOrigin(principal); 16 return result; 17 }, 18 };