I have a simple HTML page, which is importing a JS module as follows:
.. snip
<button onclick="btnClick()">Go!</button>
<script type="module">
import { func1 } from './utils.js'
function btnClick() {
func1()
}
</script>
Clicking the button produces an error: btnClick() is not defined.
Why is this happening? How to bring these functions back into correct scope?