lol-html icon indicating copy to clipboard operation
lol-html copied to clipboard

Get the text content of a HTML element?

Open vedantroy opened this issue 4 years ago • 2 comments

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(())
                    })

vedantroy avatar Feb 08 '21 22:02 vedantroy

Hello, has anyone found a solution?

tmladek avatar Apr 21 '21 14:04 tmladek

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

kornelski avatar Apr 21 '21 18:04 kornelski