Created
January 19, 2021 00:25
-
-
Save remarkablemark/cc0dac81d1a81f4b229de427ba9d5b85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<fieldset ondrop="onDrop(event);"></fieldset> | |
<script> | |
function onDrop(event) { | |
var tagName = event.dataTransfer.getData('text'); | |
event.target.appendChild(document.querySelector(tagName)); | |
event.preventDefault(); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment