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

Get the text content of a HTML element? #80

Open
vedantroy opened this issue Feb 8, 2021 · 2 comments
Open

Get the text content of a HTML element? #80

vedantroy opened this issue Feb 8, 2021 · 2 comments

Comments

@vedantroy
Copy link

If I have the following handler, is it possible to get the text content / innerHTML?

                    element!("title", |el| {
                        let page_title = // some way to get the text content of `el`
                        println!("Page Title: {:?}", page_title);
                        Ok(())
                    })
@tmladek
Copy link

tmladek commented Apr 21, 2021

Hello, has anyone found a solution?

@kornelski
Copy link
Contributor

It's not possible to get text out of an Element. You have to use text! selector instead of the element!.

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