legacy-sharedworkers-watcher.js (724B)
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 LegacyWorkersWatcher = require("resource://devtools/shared/commands/target/legacy-target-watchers/legacy-workers-watcher.js"); 8 9 class LegacySharedWorkersWatcher extends LegacyWorkersWatcher { 10 // Flag used from the parent class to listen to process targets. 11 // Decision tree is complicated, keep all logic in the parent methods. 12 _isSharedWorkerWatcher = true; 13 14 _supportWorkerTarget(workerTarget) { 15 return workerTarget.isSharedWorker; 16 } 17 } 18 19 module.exports = LegacySharedWorkersWatcher;