mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-30 21:59:36 +02:00
docs: document permissions example for geolocation plugin (#2044)
This commit is contained in:
1 parent
d402c3865a
commit
5700bd2213
1 file changed
+14
@@ -92,6 +92,20 @@ fn main() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Then, for instance, grant the plugin the permission to check or request permissions from the user and to read the device position
|
||||||
|
|
||||||
|
`src-tauri/capabilities/default.json`
|
||||||
|
|
||||||
|
```json
|
||||||
|
"permissions": [
|
||||||
|
"core:default",
|
||||||
|
"geolocation:allow-check-permissions",
|
||||||
|
"geolocation:allow-request-permissions",
|
||||||
|
"geolocation:allow-get-current-position",
|
||||||
|
"geolocation:allow-watch-position",
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
|
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|||||||
Reference in new issue
Block a user