summaryrefslogtreecommitdiffstats
path: root/remote/cdp/domains/parent/Fetch.sys.mjs
blob: 39e6965ccd9e3b25a951aafbb95322561100ea93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import { Domain } from "chrome://remote/content/cdp/domains/Domain.sys.mjs";

// Note: For now this domain has only been added so that clients using CDP
// (like Selenium) don't break when trying to disable Fetch events.

export class Fetch extends Domain {
  constructor(session) {
    super(session);

    this.enabled = false;
  }

  destructor() {
    this.disable();

    super.destructor();
  }

  disable() {
    if (!this.enabled) {
      return;
    }

    this.enabled = false;
  }
}