Get the number of recorded access requests that this user has received.
If descriptor
is provided, only access requests that match the descriptor
will be counted. Otherwise, all access requests will be counted.
Optional
descriptor: PermissionDescriptorThe descriptor of the permission to get access request count for.
Get snapshot records of access requests that this user has received.
The access request records returned are a snapshot of the access requests received as of now. They are not live records, and will not be updated if the access request is completed later. To get a fresh snapshot of the access requests, call this method again.
If descriptor
is provided, only access requests that match the descriptor
will be returned. Otherwise, all access requests will be returned.
Optional
descriptor: PermissionDescriptorThe descriptor of the permission to get access requests for.
Block access to a permission.
This is equivalent to manually blocking access to a permission via the
browser's permission settings. Calling this method will immediately set the
permission's access status to
"BLOCKED"
.
The descriptor of the permission to block access to.
Clear recorded access requests that this user has received.
If descriptor
is provided, only access requests that match the descriptor
will be cleared. Otherwise, all access requests will be cleared.
Optional
descriptor: PermissionDescriptorThe descriptor of the permission to clear access requests for.
Disable location services.
This is equivalent to disabling location services at the device, operating system, or browser level.
When location services are disabled, the Geolocation API will
produce GeolocationPositionError errors with the code
2
(position unavailable).
Enable location services.
This is equivalent to enabling location services at the device, operating system, or browser level.
Grant access to a permission.
This is equivalent to manually allowing access to a permission via the
browser's permission settings. Calling this method will immediately set the
permission's access status to
"GRANTED"
.
The descriptor of the permission to grant access to.
Jump to the given coordinates.
This will cause an immediate update to both high and low accuracy coordinates, which will be reflected via the fake Geolocation API in subsequent position retrievals, and will also cause calls to any active position watch callbacks.
The supplied parameters will first be passed to the user's UserParameters.createCoordinates function to create the high accuracy coordinates. The low accuracy coordinates will then be created by passing the high accuracy coordinates to the user's UserParameters.lowAccuracyTransform function.
The parameters of the high accuracy coordinates to jump to.
Reset access to a permission.
This is equivalent to manually resetting access to a permission via the
browser's permission settings. Calling this method will immediately set the
permission's access status to
"PROMPT"
.
The descriptor of the permission to reset access to.
Change the handler used for permission access requests.
The handler to use.
A virtual user that can affect geolocation and permissions.