Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.16 KB

File metadata and controls

37 lines (26 loc) · 1.16 KB

Import :

const DragAndDrop = brackets.getModule("utils/DragAndDrop")

isValidDrop(items) ⇒ boolean

Returns true if the drag and drop items contains valid drop objects.

Kind: global function
Returns: boolean - True if one or more items can be dropped.

Param Type Description
items Array.<DataTransferItem> Array of items being dragged

openDroppedFiles(paths) ⇒ Promise

Open dropped files

Kind: global function
Returns: Promise - Promise that is resolved if all files are opened, or rejected if there was an error.

Param Type Description
paths Array.<string> Array of file paths dropped on the application.

attachHandlers()

Attaches global drag & drop handlers to this window. This enables dropping files/folders to open them, and also protects the Brackets app from being replaced by the browser trying to load the dropped file in its place.

Kind: global function