}
};
function possibleSuccess() {
- if (document.webkitPointerLockElement == target) {
+ if (document.pointerLockElement == target) {
console.log("lock success");
if (callback)
callback("success");
failure();
}
};
- document.onwebkitpointerlockchange = possibleSuccess;
- document.onwebkitpointerlockerror = failure;
- target.webkitRequestPointerLock();
+ document.onpointerlockchange = possibleSuccess;
+ document.onpointerlockerror = failure;
+ target.requestPointerLock();
}
// In the PyAuto test the fullscreen is initiated, accepted and enters into a
lock_result = "failure"
};
function possibleSuccess() {
- if (document.webkitPointerLockElement == target) {
+ if (document.pointerLockElement == target) {
console.log("lock success");
lock_result = "success"
} else {
failure();
}
};
- document.onwebkitpointerlockchange = possibleSuccess;
- document.onwebkitpointerlockerror = failure;
- target.webkitRequestPointerLock();
+ document.onpointerlockchange = possibleSuccess;
+ document.onpointerlockerror = failure;
+ target.requestPointerLock();
}
function lockMouse1AndSetLockResult() {
function unlockMouse() {
console.log("unlockMouse()");
- document.webkitExitPointerLock();
+ document.exitPointerLock();
}
function enterFullscreenAndLockMouse1() {