docs(clipboard): Added allowlist section to the Clipboard module (#5014)

This commit is contained in:
Mateo Gallardo
2022-08-23 13:54:32 -03:00
committed by GitHub
parent 169682219a
commit d35cc77831

View File

@@ -6,6 +6,23 @@
* Read and write to the system clipboard.
*
* This package is also accessible with `window.__TAURI__.clipboard` when [`build.withGlobalTauri`](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in `tauri.conf.json` is set to `true`.
*
* The APIs must be added to [`tauri.allowlist.clipboard`](https://tauri.app/v1/api/config/#allowlistconfig.clipboard) in `tauri.conf.json`:
* ```json
* {
* "tauri": {
* "allowlist": {
* "clipboard": {
* "all": true, // enable all Clipboard APIs
* "writeText": true,
* "readText": true
* }
* }
* }
* }
* ```
* It is recommended to allowlist only the APIs you use for optimal bundle size and security.
*
* @module
*/