-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add non-availability of importmap inside worker thread #21157
Add non-availability of importmap inside worker thread #21157
Conversation
I saw on https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap that in the compat table the availability in worker threads is not listed, so this adds it.
@wolframkriesing Thanks, but I don't think this is correct. The browser compatibility data records compatibility differences between browsers and the specifications. As far as I can tell the specification does not indicate that importmaps are supported in workers so not supporting workers is not a compatibility issue - it is the expectation. In addition we don't document "all false" compatibilities - we'd document when some browser was different from all the others. While it is not a compatibility issue, we should however make it clear in the importmap docs that the feature isn't expected to work in workers. @Josh-Cena Could you please sanity check me here - the spec does not indicate support for importmap other than in the Windows / current Document context? |
Hey, I'm far from being an expert in HTML, but I think the key section in the spec is https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-worklet/module-worker-script-graph, which does indeed seem to be unaware of the import map. Maybe we should tag an HTML author? |
I understand the "we don't document "all false" compatibilities" of @hamishwillee, makes total sense. |
If it does not fit in the current strategy of what goes in the data, feel free to close the PR. I just don't have that many insights as you have, no worries. |
THanks @wolframkriesing @Josh-Cena When support for importmaps comes to workers/worklets and is implemented in at least one browser then we'll definitely need an update to BCD. For now, closing this. I'll see if I can add a note somewhere in the docs to make it clear this is currently windows only. |
OK, so added the information about importmaps and workers in mdn/content#30078 Thanks again. |
I saw on https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap that in the compat table the availability in worker threads is not listed, so this adds it.
Summary
This should add the "available in worker" threads row in the importmaps compat table. And since they are not yet available all should be "No". To be honest, I am not sure what the
mirror
attributes mean, I just took them from the__compat
section. Help appreciated.Test results and supporting details
I only tested that the JSON is valid, by copying it into my console, but I am not sure if this is all correct. It looks good, but might be all wrong, help appreciated.