Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

Latest commit

 

History

History
59 lines (44 loc) · 2.26 KB

api-references.md

File metadata and controls

59 lines (44 loc) · 2.26 KB

API References

CopySuccess

interface CopySuccess {
  value: string;
}

CopyError

interface CopyError {
  reason: Error;
}

ReallyClipboardCopy

Propeties

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.

Methods

None

Events

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.

CSS Custom Properties

None