Expand event documentation for next #2036
Merged
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.
Description
Moves the event type table to it's own page and expand on event
documentation in general.
The typed target section is to cover the issues I think some users will
find when
InputData
andChangeData
disappear when migrating fromv0.18
to
v0.19
(ormaster
), it also adds documentation forTargetCast
(which admittedly should have come with #2000 😢 ).
In the future when #1460 is completed, the
JsCast
bit might just link tothat section instead?
Adds a section about adding event listeners when the event is not supported in
the
html
macro, which I've seen asked about a few times in our Discord andiirc I've seen some issues about this too.
There might be another section or two that could be added here, and I'm
happy to do so. I did think about an example of using a specific
web_sys
event type and using those specific methods, but not sure if this is worth
it? 🤔
Note
This is only on the
next
docs so I don't have to keep tweaking two sets ofsimilar docs - I think once this is done then relevant bits can be moved
over to the versioned docs and code blocks can be adapted too.
Issue has been mentioned in Discord too about having an "Event" page.
Fixes #1904
Closes #667 - I think this was more to do with when Yew had event wrappers
so could possibly be closed w/o this PR.
Checklist
cargo make pr-flow