surreal icon indicating copy to clipboard operation
surreal copied to clipboard

support scripts using module

Open quinn opened this issue 1 year ago • 2 comments

from mdn docs:

https://developer.mozilla.org/en-US/docs/Web/API/Document/currentScript

The Document.currentScript property returns the element whose script is currently being processed and isn't a JavaScript module. (For modules use import.meta instead.)

i'm basically doing:

<script type="module">
	import { thing } from './thing.js';
	thing(me());
</script>

quinn avatar Aug 20 '24 18:08 quinn

Ok, import.meta isn't helpful here. It looks like there is an open issue on the spec for this:

https://github.com/whatwg/html/issues/1013

quinn avatar Aug 20 '24 18:08 quinn

Thanks for looking into this. Would love to make it happen once it's in available.

gnat avatar Oct 13 '24 08:10 gnat