ondragenter event
Fires on the target element when the user drags the object to a valid drop target.
HTML Attribute | <element ondragenter = "handler(event)"> |
Event Property | object.ondragenter = handler; |
attachEvent Method | object.attachEvent("ondragenter", handler) |
addEventListener Method | object.addEventListener("dragenter", handler, useCapture) |
Synchronous | No |
Bubbles | Yes |
Cancelable | Yes |
- pEvtObj [in]
Type: IHTMLEventObj
There are no standards that apply here.
You can handle the HTMLElementEvents::ondragenter event on the source or on the target object. Of the target events, it is the first to fire during a drag operation. Target events use the IHTMLDataTransfer::getData method to stipulate which data and data formats to retrieve. The list of drag-and-drop target events includes:
- HTMLElementEvents::onbeforepaste
- HTMLElementEvents::onpaste
- HTMLElementEvents::ondragenter
- HTMLElementEvents::ondragover
- HTMLElementEvents::ondragleave
- HTMLElementEvents::ondrop
When scripting custom functionality, use the IHTMLEventObj::returnValue property to disable the default action.
Calls the associated event handler.
To invoke this event, do one of the following:
- Drag the selection over a valid drop target within the client.
- Drag the selection to a valid drop target within another window.