tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

BrowserTabChild.sys.mjs (590B)


      1 /* vim: set ts=2 sw=2 sts=2 et tw=80: */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 export class BrowserTabChild extends JSWindowActorChild {
      7  constructor() {
      8    super();
      9  }
     10 
     11  receiveMessage(message) {
     12    let context = this.manager.browsingContext;
     13    let docShell = context.docShell;
     14 
     15    switch (message.name) {
     16      case "ForceEncodingDetection":
     17        docShell.forceEncodingDetection();
     18        break;
     19    }
     20  }
     21 }