-
Notifications
You must be signed in to change notification settings - Fork 5
Draft spec text #10
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
Draft spec text #10
Conversation
| <p>See <a href="https://github.com/styfle/proposal-import-bytes/blob/main/README.md">the explainer</a> for information.</p> | ||
| <emu-note type="editor"> | ||
| <p>This proposal is buit on top of the <a href="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/tc39/proposal-import-attributes">Import Attributes</a> proposal.</p> | ||
| <p>This proposal is buit on top of the <a href="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/tc39/proposal-json-modules">JSON Modules</a> and <a href="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/tc39/proposal-immutable-arraybuffer">Immutable Array Buffer</a> proposals.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might need to update the readme as well if we want to swap import-attributes for json-modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think import-attributes is correct.
This proposal is built on top of import-attributes, not json-modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way I framed it we are sharing JSON modules text per the next comment.
|
|
||
| <emu-note> | ||
| <p><ins>The above text implies that hosts *must* support JSON modules imported with `type: "json"` (if it completes normally), but it doesn't prohibit hosts from supporting JSON modules imported with no type specified. Some environments (for example, web browsers) plan to require `with { type: "json" }`, and environments which want to restrict themselves to a compatible subset would do so as well.</ins></p> | ||
| <p>The above text implies that hosts *must* support JSON modules <ins>and buffer modules</ins> imported with `type: "json"` <ins>and `type: "buffer"` respectively </ins>(if it completes normally), but it doesn't prohibit hosts from supporting JSON modules imported with no type specified. Some environments (for example, web browsers) plan to require `with { type: "json" }`, and environments which want to restrict themselves to a compatible subset would do so as well.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to remove the type: "json" part mentioned here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I've based this to JSON modules, it's sharing this note with JSON modules.
|
The rendered spec for this PR is available at https://styfle.github.io/proposal-import-buffer/pr/10. |
styfle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thanks!
|
@guybedford Since this was changed from returning ArrayBuffer to Uint8Array, do we need to update this spec? |
Threw together some very simple draft spec text, which should be enough for a Stage 2 if there is interest.