interface CopySuccess {
value: string;
}
interface CopyError {
reason: Error;
}
Property | Type | Default | Description |
---|---|---|---|
forSlot |
string | copy-for |
The content of an element that has the copy-for attribute set will the copied to the clipboard. |
idSlot |
string | copy-id |
The element that has the copy-id attribute set will trigger the copy function to copy the content of an element that has the copy-for attribute set. This usually is a clickable element such as the <button> element. |
sync |
boolean | false |
If true, document.execCommand('copy') will be used instead of the native Async Clipboard API if supported. |
None
Event | detail Type |
Description |
---|---|---|
copy-success |
CopySuccess | Fires when the content of the element that has the copy-for attribute set is copied to the clipboard. |
copy-error |
CopyError | Fires when content fails to be copied to the clipboard. |
None