This interface is implemented by a global Clipboard object.
interface IClipboard {
// Methods
${set}(text: string): void;
${get}(format: string): any;
${get#get1}(format: "text"): string;
${hasData}(format: string): boolean;
// Events
${dataAvailable}(handler: (format: string) => void): number;
${dataAvailable}(eventId: number): void;
}
// This interface is not available in managed environment
// This interface is not available in native environment
set(text: string): void;
// This method is not available in managed environment
// This method is not available in native environment
textPut given text into the clipboard
get(format: string): any;
// This method is not available in managed environment
// This method is not available in native environment
formatGet data from the clipboard in a given format. Currently, only “text” format is supported.
get(format: "text"): string;
// This method is not available in managed environment
// This method is not available in native environment
formatGet text data from the clipboard.
hasData(format: string): boolean;
// This method is not available in managed environment
// This method is not available in native environment
formatCheck if clipboard has data in a given format. Currently, only “text” format is supported.
dataAvailable(handler: (format: string) => void): number;
dataAvailable(eventId: number): void;
formatThis event is fired with a format string when data in that format becomes available in the clipboard.