I'm using VbsEdit to edit an html file and run it as a exe. I'm using VbsEdit rather than other code editors because, it can convert html to exe and I'm trying to make an application with HTML/JS/CSS without it being in a browser. VbsEdit displays an error window with the drag and drop code I have when I drag a object onto itself. Personally the error won't bother me because I won't be dragging the object onto itself, but it's not mainly for myself.
function allowDrop(ev) {
ev.preventDefault();
}
function drag(ev) {
ev.dataTransfer.setData("text", ev.target.id);
}
function drop(ev) {
ev.preventDefault();
var data = ev.dataTransfer.getData("text");
ev.target.appendChild(document.getElementById(data)); //Line that always has error
/* (idea that failed)
if(ev.target.a.classList.contains("Item") != true) {
ev.target.appendChild(document.getElementById(data));
}
*/
}
Answers for questions that I think might have come up:
ev.target.a.classList.contains("Item") does contain
Item in the classes.
(If I missed any question that could have been asked (I know I did because, I forgot half of the questions I came up with before I could type them) feel free to ask but I'm not online often so, sorry if it takes me a while to reply)