requestPointerLockAsync

fun requestPointerLockAsync(options: PointerLockOptions = definedExternally): Promise<Void>(source)

The requestPointerLock() method of the Element interface lets you asynchronously ask for the pointer to be locked on the given element.

MDN Reference