resources.js (695B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 "use strict"; 6 7 const Resources = require("resource://devtools/server/actors/resources/index.js"); 8 9 module.exports = { 10 async addOrSetSessionDataEntry( 11 targetActor, 12 entries, 13 isDocumentCreation, 14 updateType 15 ) { 16 if (updateType == "set") { 17 Resources.unwatchAllResources(targetActor); 18 } 19 await Resources.watchResources(targetActor, entries); 20 }, 21 22 removeSessionDataEntry(targetActor, entries) { 23 Resources.unwatchResources(targetActor, entries); 24 }, 25 };