PointerLockChild.sys.mjs (543B)
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 PointerLockChild extends JSWindowActorChild { 6 handleEvent(event) { 7 switch (event.type) { 8 case "MozDOMPointerLock:Entered": 9 this.sendAsyncMessage("PointerLock:Entered"); 10 break; 11 12 case "MozDOMPointerLock:Exited": 13 this.sendAsyncMessage("PointerLock:Exited"); 14 break; 15 } 16 } 17 }