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

import.meta.url, and import.meta generally #208

Closed
3 of 5 tasks
domenic opened this issue Oct 20, 2017 · 6 comments
Closed
3 of 5 tasks

import.meta.url, and import.meta generally #208

domenic opened this issue Oct 20, 2017 · 6 comments
Assignees

Comments

@domenic
Copy link
Member

domenic commented Oct 20, 2017

Dear Sirs and Madam of TAG!

Another ECMAScript/web platform-spanning review for you all.

Further details (optional):

You should also know that...

This design went through a lot of discussion at TC39 as to the exact syntax for exposing per-module metadata. You can find some minutes discussing the above-linked presentation if you are curious as to how the specific choices here were arrived at.

We'd prefer the TAG provide feedback as (please select one):

  • open issues in our Github repo for each point of feedback
  • open a single issue in our Github repo for the entire review
  • leave review feedback as a comment in this issue

If the TAG is interested, we're currently trying to figure out how to add a second import.meta property, import.meta.scriptElement, but it is a bit tricky. Feel free to help us out at whatwg/html#1013; the trouble starts around whatwg/html#1013 (comment) .

@plinss plinss added this to the tag-telcon-2017-12-12 milestone Dec 5, 2017
@torgo
Copy link
Member

torgo commented Dec 12, 2017

We discussed on today's call. @slightlyoff to write some feedback.

@plinss plinss modified the milestones: tag-telcon-2017-12-12, tag-telcon-2018-02-13 Feb 2, 2018
@slightlyoff
Copy link
Member

Wow, sorry for leaving this so long.

I note that this has probably shipped: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/Hq3cVNto74c

In general, the feature looks hugely useful. My only concern is about naming collisions. Given that names are added by host environments, it would seem best if there were a central registry.

@annevk
Copy link
Member

annevk commented Mar 13, 2018

Per https://tc39.github.io/proposal-import-meta/ the host (of which there's always one) supplies all the values, so by definition whoever implements HostGetImportMetaProperties (HTML Standard in case of the web platform) will define the registry.

@lin7sh
Copy link

lin7sh commented Jun 22, 2018

what about import.meta.scriptElement?

@slightlyoff
Copy link
Member

@annevk: HTML having a unique registry (not shared, ala IANA) is exactly the problem I was trying to raise. Happy to see this ship, but would like to see the registry situation end up in a more centralized place across specs and stacks.

@annevk
Copy link
Member

annevk commented Oct 31, 2018

@slightlyoff fair, I raised tc39/proposal-import-meta#14 to see if some alternate design can be considered that encourages cross-host collaboration.

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

6 participants