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
Change
html-macro
'schecked
attribute to specify checkedness #206Change
html-macro
'schecked
attribute to specify checkedness #206Changes from 1 commit
5ab4fdd
eccdd56
702a494
9739e77
a6c9e2a
8e08e79
6253741
8e11bbe
7099525
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 make sure to demonstrate the following:
html!
macrohtml!
macro.special_attributes.on_create_element
to demonstrate how to ensure that the unmanaged element gets inserted afterpercy
creates the DOM node.div_elem: web_sys::Element
on hand like you do in this exampleLet's make the example append the input to a non-root node. This is the more common scenario. Or, feel free to demonstrate both.
I'm imagining that this
fn main
can call some different functions that each demonstrate some subset of the above list + the things that you are already demonstrating.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.
Turns out this forces a mix of the above points such that there's only really one good way of doing it... sort of. Not using
html!
at all is possible and isn't demonstrated, but I don't think showing the example withouthtml!
is adding anything but verbosity, ashtml!
currently isn't being used for anything that can't be easily manually constructed withVElement
s.I can remove the use of
html!
if you feel strongly about it, or alternatively add another version of the function that doesn't usehtml!
.I recommend checking the new example first and seeing if you feel its necessary, once I commit it. (I'm not exactly sure why you want two versions.)
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.
Only usingHybrid approach sounds okay.html!
sounds good.Agree that we shouldn't mix concepts unless it truly demonstrates something important.
We can always have a future example that shows how to create nodes with the macro.