Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[docs] TypeScript sample on front page with JS in a code editor #491
[docs] TypeScript sample on front page with JS in a code editor #491
Changes from 4 commits
805f5b3
09e9a63
63ba264
f2283c3
dc02385
d2b08e3
d070c9c
df99ac5
469ea64
7d51ef2
5e249b6
bfe8c3d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 use the
customElement
decorator too: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.
Do you also then have to add the
interface HTMLElementTagThingStuff
?https://github.com/Polymer/lit-element/blob/0093b439fa53e26707a84690d17bf15f54baae3e/src/lib/decorators.ts#L78
Seems noisier
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.
@katejeffreys No, as in #291 this was changed to only be a string. Before it would actually check if the string was part of
HTMLElementTagNameMap
. Probably the comment in the source code should also be removed.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.
can we then remove
customElements.define('custom-greeting', CustomGreeting);
?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.
@katejeffreys Yes,
@customElement('custom-greeting')
andcustomElements.define('custom-greeting', CustomGreeting);
do the same thing. Only one is needed.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.
Any reason to use the bundle over the loader?
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.
Easier loading process I think? i forget
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.
Indent
<head>
to the same level as<body>
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.
Why do we have a separate file here? We can just import the tag directly into the HTML.
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 stackblitz, consistency, & clarity...
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 agree with separate files for elements in most cases (trying to show only how two elements can compose might be easier with two very small elements in one file).
The stackblitz limitations should be gone with the
lit-html
project template, which will hopefully be usable tomorrow. We can think about migrating to that later...