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

RcDom issues in html2html example #555

Open
atjn opened this issue Sep 28, 2024 · 2 comments
Open

RcDom issues in html2html example #555

atjn opened this issue Sep 28, 2024 · 2 comments

Comments

@atjn
Copy link

atjn commented Sep 28, 2024

I am trying to figure out how to use this parser, and as far as I can tell, the only "getting started" documentation you provide is the html2html example.

html2html uses the markup5ever_rcdom package, which you have decided to make "unofficial" because it is unsafe and incorrect. This means two things:

  1. The html2html example doesn't build by default and provides the message "the trait TreeSink is not implemented for RcDom". It took me quite a lot of hair pulling to figure out that you must pin the markup5ever_rcdom to version 0.5.0-unofficial to fix that problem.

  2. If the only documentation you have for using this crate is a bad implementation, how am I supposed to use it? If you had some documentation on how I could write my own RcDom that would go a long way, but I don't see any.

@jdm
Copy link
Member

jdm commented Sep 28, 2024

Mmm, point 1 is definitely a problem! I'll see if I can fix that.

@nicoburns
Copy link
Contributor

@atjn Not a substitute for proper documention, but we have an implementation here (https://github.com/DioxusLabs/blitz/blob/main/packages/blitz-dom/src/htmlsink.rs) which you could use as a second reference. Although our implementation has been less reliable (sometimes panics) since the latest HTML5ever version switched to using interior mutability, and I haven't had chance to track down why yet.

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

No branches or pull requests

3 participants