-
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
replace keyword from with
to if
#71
Conversation
I will also update the syntax section of the README with an explanation before we merge this. |
|
||
```html | ||
<script src="foo.wasm" type="module" withtype="webassembly"></script> | ||
<script src="foo.wasm" type="module" iftype="webassembly"></script> |
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.
not that it's really up to this proposal, but withtype
/iftype
seem weird to me; i'd expect if-type
or if:type
or something else that indicated a hierarchy.
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 name here is intended to match HTML attribute naming conventions. See https://w3ctag.github.io/design-principles/#casing-rules
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.
that talks about concatenating multi-word things, like "max length" - "if type" isn't a single word, it's a hierarchy, and it is very not clear to me that "iftype" is the thing these principles dictate. it seems more like this is a case those principles simply haven't considered.
certainly this PR/repo isn't the place to discuss it tho :-) i'd appreciate a link, if you have one and when the time is relevant, to the appropriate place
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.
Would it be OK if the MVP web integration did not include specifying import attributes on the script tag? I think this can be delayed until we have a type on the web that motivates the use case.
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 showing the HTML example illustrate possible uses cases, but maybe we should make it clear that it's not meant for TC39?
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.
Isn’t JSON the web type motivating the entire proposal?
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.
Yes, initially (though other module types are also considered part of the motivation), and it does not make sense to have a script tag with a JSON module--it would not do anything, since there's no way to get the exports out of a module in a script tag.
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 added a sentence to make it clear that it's outside of TC39
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.
LGTM, but please write in the explainer that the if
name is designed to explain/evoke the "check" semantics, and that one could imagine a separate with
section as a follow-on proposal for "evaluator" attributes.
Refs #3