When using the HTML Drap and Drop API, how can I change what the cursor looks like?
It seems to be using the default no-drop
while not over a dropable zone as well as some other ones (that I can't find in the list of standard cursors) while over a droppable zone. As I'm implementing a game and would like to be able to drag & drop items onto each other, this API is perfect for this, execpt I cannot control what the cursor looks like it seems. And the default browser cursors are very different from my custom cursor(s) that I have throughout the game so I'd like to be able to modify them.
I found this answer, but I will not add jquery to the project just for this.
Is there a css pseudoelement or some script way (e.g. by modifying the drag event) that I can use? I've looked at the Drag & Drop API documentation but to no avail.
I'd be happy if I can just hide the cursor altogether. While not ideal, I could use that to then place a custom cursor on the screen using js.
Edit: This is what the cursors I'm trying to change look like. They appear (like this or similar) once you started dragging - the first one if you're above a dropzone, the second one if you're not.
You can try it by marking any text in this post and try to drag it around the page. In the search bar or answer field you'll get a version of the first cursor, everywhere else you'll get the second.
cursor: grab
andcursor: grabbing
?