-
Notifications
You must be signed in to change notification settings - Fork 27
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
Specifying JSON modules #53
Conversation
<p>The abstract operation ParseJSONModule takes a single argument _source_ which is a String representing the contents of a module.</p> | ||
|
||
<emu-alg> | ||
1. Let _json_ be ? Call(%JSONParse%, *undefined*, « _source_ »). <!-- TODO: Refactor JSONParse into an abstract algorithm --> |
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.
Should the JSON be frozen? What if a developer accidentally call the json.arr.sort()
then the file is corrupted
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.
Let's discuss this in a separate issue: https://github.com/tc39/proposal-module-attributes/issues/54
1. Perform ! HostImportModuleDynamically(_referencingScriptOrModule_, _specifierString_, <ins>_attr_,</ins> _promiseCapability_). | ||
1. <ins>Let _argRef_ be the result of evaluating the second |AssignmentExpression|.</ins> | ||
1. <ins>Let _arg_ be ? GetValue(_argRef_).</ins> | ||
1. <ins>If _arg_ is *undefined*, let _attributes_ be *undefined*.</ins> |
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.
Note that this PR also fixes #52 .
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.
Good point, added to the commit message.
I'm going to land this PR; review comments still welcome. |
This PR also fixes #52