tor-browser

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

AppTestDelegateChild.sys.mjs (561B)


      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 export class AppTestDelegateChild extends JSWindowActorChild {
      6  handleEvent(event) {
      7    switch (event.type) {
      8      case "DOMContentLoaded":
      9      case "load": {
     10        this.sendAsyncMessage(event.type, {
     11          internalURL: event.target.documentURI,
     12          visibleURL: event.target.location?.href,
     13        });
     14        break;
     15      }
     16    }
     17  }
     18 }