I have a piece of code that implements Cropper.js for interactive cropping of an image. Unfortunately, chrome gives the error
Uncaught ReferenceError: onFileSelected is not defined at HTMLInputElement.onchange ((index):35),"
despite the fact that these functions are clearly defined, when I reference my scripts.js file as
<script type="module" src="js/scripts.js"></script>
instead of
<script type="text/javascript" src="js/scripts.js"></script>
Am I missing something here? Can a script that as loaded as a module not be used for these onchange events? Any help would be appreciated