Skip to content

Commit

Permalink
docs(useClipboard): add brief of option legacy (#2447)
Browse files Browse the repository at this point in the history
  • Loading branch information
lumdzeehol committed Nov 16, 2022
1 parent 6d286ac commit fe4b964
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/useClipboard/index.md
Expand Up @@ -24,3 +24,5 @@ const { text, copy, copied, isSupported } = useClipboard({ source })
<span v-else>Copied!</span>
</button>
```

Set `legacy: true` to keep the ability to copy if [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API) is not available. It will handle copy with [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand) as fallback.

0 comments on commit fe4b964

Please sign in to comment.