Uses the given element to update the drag feedback image, replacing any previously specified feedback image.
Method of dom/DataTransferdom/DataTransfer
Syntaxvar result = element.setDragImage(element, x, y);
Parameters element
An “img” element, used to set the drag data store bitmap to the element’s image (at its intrinsic size). If not an “img” element, used to set the drag data store bitmap to an image generated from the given element, although the mechanism for doing so is not currently specified.
xThe “x” value of the drag data store hot spot coordinate.
yThe “y” value of the drag data store hot spot coordinate.
Return ValueReturns an object of type
Examples
function setDragImage(e) {
var img = document.getElementById("dragimg");
var oData = e.dataTransfer;
oData.setDragImage (img, 0, 0);
}
Related specifications
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4