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="https://github.com/tc39/proposal-import-attributes">Import Attributes</a> proposal.</p> | ||
| <p>This proposal is buit on top of the <a href="https://github.com/tc39/proposal-json-modules">JSON Modules</a> and <a href="https://github.com/tc39/proposal-immutable-arraybuffer">Immutable Array Buffer</a> proposals.</p> |
There was a problem hiding this comment.
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.
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.
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.
I think we need to remove the type: "json" part mentioned here, right?
There was a problem hiding this comment.
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. |
|
@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.