Hex Editor - Binary File Editing Software for Windows
Download Hex Editor Neo Hide this button

Clipboard Object Reference

This interface is implemented by a global Clipboard object.

Declaration

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

IClipboard Methods

set

set(text: string): void;
// This method is not available in managed environment
// This method is not available in native environment
text
Text to put into the Clipboard.

Put given text into the clipboard

get

get(format: string): any;
// This method is not available in managed environment
// This method is not available in native environment
format
Format type. Currently only “text” format is supported.

Get data from the clipboard in a given format. Currently, only “text” format is supported.

get

get(format: "text"): string;
// This method is not available in managed environment
// This method is not available in native environment
format
Format type.

Get text data from the clipboard.

hasData

hasData(format: string): boolean;
// This method is not available in managed environment
// This method is not available in native environment
format
Format to check. Currently only “text” format is supported.

Check if clipboard has data in a given format. Currently, only “text” format is supported.

IClipboard Events

dataAvailable

dataAvailable(handler: (format: string) => void): number;
dataAvailable(eventId: number): void;

format
Type of data that appeared in the Clipboard. Currently, only “text” format is supported.

This event is fired with a format string when data in that format becomes available in the clipboard.