Instead of commenting what a piece of code does, create a function with a name that describes what it does.
The code below the comment might change without the comment, and in time, the comment will become outdated, possibly wrong, and end up as a lie.
// enable dragging and dropping of images
window.addEventListener('dragover', preventDefault);
window.addEventListener('dragenter', preventDefault);
window.addEventListener('drop', files => controller.readDroppedFiles(files));
function enableDragAndDropOfImagesFiles(controller) {
window.addEventListener('dragover', preventDefault);
window.addEventListener('dragenter', preventDefault);
window.addEventListener('drop', files => controller.readDroppedFiles(files));
}
enableDragAndDropOfImagesFiles(controller);