This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem/kind | |
enum DataTransferItemKind { | |
FILE = "file", | |
STRING = "string", | |
} | |
/** | |
* Returns a properly deep-cloned object of type DataTransfer. This is necessary because dataTransfer items are lost | |
* in asynchronous calls. See https://stackoverflow.com/questions/55658851/javascript-datatransfer-items-not-persisting-through-async-calls | |
* for more details. |