happy-dom
Version:
Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.
50 lines • 1.13 kB
TypeScript
import File from '../file/File.cjs';
import DataTransferItemList from './DataTransferItemList.cjs';
/**
* DataTransfer.
*
* Reference:
* https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer
*/
export default class DataTransfer {
dropEffect: 'none' | 'copy' | 'link' | 'move';
effectAllowed: 'none' | 'copy' | 'copyLink' | 'copyMove' | 'link' | 'linkMove' | 'move' | 'all' | 'uninitialized';
readonly items: DataTransferItemList;
/**
* Returns files.
*
* @returns Files.
*/
get files(): File[];
/**
* Returns types.
*
* @returns Types.
*/
get types(): string[];
/**
* Clears the data.
*/
clearData(): void;
/**
* Sets the data.
*
* @param format Format.
* @param data Data.
*/
setData(format: string, data: string): void;
/**
* Gets the data.
*
* @param format Format.
* @returns Data.
*/
getData(format: string): string;
/**
* Sets drag image.
*
* TODO: Implement.
*/
setDragImage(): void;
}
//# sourceMappingURL=DataTransfer.d.ts.map