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

Clarify where the base is for relative module specifiers #35754

Closed
sapphi-red opened this issue Sep 5, 2024 · 1 comment · Fixed by #35998
Closed

Clarify where the base is for relative module specifiers #35754

sapphi-red opened this issue Sep 5, 2024 · 1 comment · Fixed by #35998
Labels
Content:JS JavaScript docs

Comments

@sapphi-red
Copy link
Contributor

MDN URL

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#module-name

What specific section or headline is this issue about?

Syntax > module-name

What information was incorrect, unhelpful, or incomplete?

When a relative path is written, it does not say where the base will be at resolution.

What did you expect to see?

Update This is often a relative or absolute URL to the .js file containing the module. to This is often an URL relative to the file containing the statement or an absolute URL pointing the .js file containing the module..
I'm not sure if this wording is clear though.

Import maps might need to be taken into consideration.

Do you have any supporting links, references, or citations?

Do you have anything more you want to share?

Another page that should be updated together.

@sapphi-red sapphi-red added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Sep 5, 2024
@github-actions github-actions bot added Content:JS JavaScript docs Content:WebAPI Web API docs and removed Content:WebAPI Web API docs Content:JS JavaScript docs labels Sep 5, 2024
@Josh-Cena
Copy link
Member

We try not to bias our module documentation to the web, as the module specifier resolution can differ between environments. Nevertheless, I like your suggestion, and if we prefix it by "in the browser" we can certainly add it to the docs (linking to the import map docs).

@Josh-Cena Josh-Cena added Content:JS JavaScript docs and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:JS JavaScript docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants