Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DataTransfer

Hierarchy

  • DataTransfer

Index

Properties

dropEffect

dropEffect: string

effectAllowed

effectAllowed: string

files

files: FileList

Returns a FileList of the files being dragged, if any.

items

Returns a DataTransferItemList object, with the drag data.

types

types: ReadonlyArray<string>

Returns a frozen array listing the formats that were set in the dragstart event. In addition, if any files are being dragged, then one of the types will be the string "Files".

Methods

clearData

  • clearData(format?: undefined | string): void
  • Removes the data of the specified formats. Removes all data if the argument is omitted.

    Parameters

    • Optional format: undefined | string

    Returns void

getData

  • getData(format: string): string
  • Returns the specified data. If there is no such data, returns the empty string.

    Parameters

    • format: string

    Returns string

setData

  • setData(format: string, data: string): void
  • Adds the specified data.

    Parameters

    • format: string
    • data: string

    Returns void

setDragImage

  • setDragImage(image: Element, x: number, y: number): void
  • Uses the given element to update the drag feedback, replacing any previously specified feedback.

    Parameters

    • image: Element
    • x: number
    • y: number

    Returns void

Generated using TypeDoc