Testing #150321
The current DataTransferItem type looks like:
export class DataTransferItem {
asString(): Thenable<string>;
readonly value: any;
constructor(value: any);
/**
* Try getting the file associated with this data transfer item.
*
* Note that the file object is only valid for the scope of the drag and drop operation.
*
* @returns The file for the data transfer or `undefined` if the item is not a file.
*/
asFile(): DataTransferFile | undefined;
}
I find that it is not clear what the proposed behavior of .asString() should be for file items. It might be helpful to have a .kind property to help differentiate between types of things being transferred.
Testing #150321
The current
DataTransferItemtype looks like:I find that it is not clear what the proposed behavior of
.asString()should be for file items. It might be helpful to have a.kindproperty to help differentiate between types of things being transferred.