-
Notifications
You must be signed in to change notification settings - Fork 22.7k
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 assertions proposal renamed to import attributes #29572
Comments
@nicolo-ribaudo The only place that mentions assertions is the browser compat, which is accurate because it indeed had been and probably is still shipped in browsers, and we don't remove their mention until they have been unshipped for two years. I will be writing docs for import attributes, but I still don't fully appreciate attributes' differences with assertions (what runtime effects do they have exactly? Are they essentially part of the specifier?), and I'm currently still working on set methods, so this one will wait until it has a bit more implementation. |
The main difference is that unknown attribute keys throw an error rather than being ignores (i.e. I will open a PR for compat data for engines supporting |
I will work on a PR next week when I'm on break. Would appreciate your review by then ;) |
@nicolo-ribaudo I've started the documentation process, but since this has impacts beyond what's reflected in the spec, I want to ask a few clarifying questions.
Thank you for the help! |
No,
Mostly whatwg/html#7233, whatwg/html#9486, and tc39/proposal-import-attributes#125
They can affect how a module is resolved, how it's fetched, and how it's parsed. Basically every stage that transforms the import specifier to a Module Record (a spec construct that basically exposes metadata about the module and a function to evaluate it). So yes, |
MDN URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
What specific section or headline is this issue about?
No response
What information was incorrect, unhelpful, or incomplete?
That page mention import assertions, with the
import ... assert { ... }
syntax.What did you expect to see?
The proposal has been renamed to "import attributes", and the keyword has been replaced from
assert
towith
.assert
is now "deprecated and should not be relied upon".Do you have any supporting links, references, or citations?
https://tc39.es/proposal-import-attributes/, specifically https://tc39.es/proposal-import-attributes/#sec-deprecated-assert-keyword-for-import-attributes.
Do you have anything more you want to share?
Chrome is the only browser implementing
assert
(and V8-based platforms).Chrome implements
with
under a flag (and V8-based platforms), Safari implementswith
in TP and Firefox is implementing it.The proposal update comes also with some semantic changes, however these details have never been documented so there is no change needed to the docs:
The text was updated successfully, but these errors were encountered: