Interface IDataTransferBeta

Interface for managing data transfer during drag and drop operations.

interface IDataTransfer {
    dropEffect: string;
    effectAllowed: string;
    files: FileList;
    items: DataTransferItemList;
    types: string[];
    clearData(format?: string): void;
    getData(format: string): null | string;
    setData(format: string, data: string): void;
    setDragImage?(img: Element, xOffset: number, yOffset: number): void;
}

Properties

dropEffect: string

The drop effect for the drag operation.

effectAllowed: string

The effect allowed for the drag operation.

files: FileList

The list of files being transferred.

items: DataTransferItemList

The items being transferred.

types: string[]

The types of data being transferred.

Methods

  • Beta

    Clears the data for the specified format or all formats if none is specified.

    Parameters

    • Optionalformat: string

      The format of the data to clear.

    Returns void

  • Beta

    Retrieves the data for the specified format.

    Parameters

    • format: string

      The format of the data to retrieve.

    Returns null | string

    The data for the specified format, or null if not found.

  • Beta

    Sets the data for the specified format.

    Parameters

    • format: string

      The format of the data.

    • data: string

      The data to be set.

    Returns void

  • Beta

    Sets the image to be used for dragging.

    Parameters

    • img: Element

      The image element to be used.

    • xOffset: number

      The horizontal offset.

    • yOffset: number

      The vertical offset.

    Returns void