tor-browser

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

PointerLockParent.sys.mjs (687B)


      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 PointerLockParent extends JSWindowActorParent {
      6  receiveMessage(message) {
      7    let browser = this.manager.browsingContext.top.embedderElement;
      8    switch (message.name) {
      9      case "PointerLock:Entered": {
     10        browser.ownerGlobal.PointerLock.entered(
     11          this.manager.documentPrincipal.originNoSuffix
     12        );
     13        break;
     14      }
     15 
     16      case "PointerLock:Exited": {
     17        browser.ownerGlobal.PointerLock.exited();
     18        break;
     19      }
     20    }
     21  }
     22 }