Skip to content
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

Expand event documentation for next #2036

Merged
merged 3 commits into from
Sep 6, 2021
Merged

Conversation

mc1098
Copy link
Contributor

@mc1098 mc1098 commented Sep 6, 2021

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 and ChangeData disappear when migrating from v0.18
to v0.19 (or master), it also adds documentation for TargetCast
(which admittedly should have come with #2000 😢 ).

In the future when #1460 is completed, the JsCast bit might just link to
that 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 and
iirc 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 of
similar 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

  • I have run cargo make pr-flow
  • I have reviewed my own code
  • I have added tests

@github-actions
Copy link

github-actions bot commented Sep 6, 2021

Visit the preview URL for this PR (updated for commit 3c70d32):

https://yew-rs--pr2036-website-doc-events-nug6crb8.web.app

(expires Mon, 13 Sep 2021 19:56:41 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@siku2 siku2 merged commit 282eb19 into yewstack:master Sep 6, 2021
@mc1098 mc1098 deleted the website-doc-events branch September 7, 2021 18:15
@mc1098 mc1098 mentioned this pull request Sep 9, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Register event example Document how to use events
2 participants