Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support scripts using module #40

Open
quinn opened this issue Aug 20, 2024 · 2 comments
Open

support scripts using module #40

quinn opened this issue Aug 20, 2024 · 2 comments

Comments

@quinn
Copy link

quinn commented Aug 20, 2024

from mdn docs:

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

The Document.currentScript property returns the <script> 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
Copy link
Author

quinn commented Aug 20, 2024

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

whatwg/html#1013

@gnat
Copy link
Owner

gnat commented Oct 13, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants