Web/JavaScript

[mozilla api] drag and drop

태애니 2023. 8. 29. 20:15
728x90

https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API

 

HTML Drag and Drop API - Web APIs | MDN

HTML Drag and Drop interfaces enable applications to use drag-and-drop features in browsers.

developer.mozilla.org

 

 

다 한번 실제로 적용해봐야겠음

 

 

drag - ondrag

dragend - ondragend

dragenter  - ondragenter <적합한 드롭 대상 위로 올라갔을 때>

.

drag ...a dragged item (element or text selection) is dragged.
dragend ...a drag operation ends (such as releasing a mouse button or hitting the Esc key; see Finishing a Drag.)
dragenter ...a dragged item enters a valid drop target. (See Specifying Drop Targets.)
dragleave ...a dragged item leaves a valid drop target.
dragover ...a dragged item is being dragged over a valid drop target, every few hundred milliseconds.
dragstart ...the user starts dragging an item. (See Starting a Drag Operation.)
drop ...an item is dropped on a valid drop target. (See Performing a Drop.)

 

 

 

draggable

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/draggable

 

draggable - HTML: HyperText Markup Language | MDN

The draggable global attribute is an enumerated attribute that indicates whether the element can be dragged, either with native browser behavior or the HTML Drag and Drop API.

developer.mozilla.org

 

 

 

 

728x90