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

Function to get node own Text() #296

Closed
esrrhs opened this issue Jun 9, 2019 · 2 comments
Closed

Function to get node own Text() #296

esrrhs opened this issue Jun 9, 2019 · 2 comments

Comments

@esrrhs
Copy link

esrrhs commented Jun 9, 2019

// Text gets the combined text contents of each element in the set of matched
// elements, including their descendants.
func (s *Selection) Text() string {

is there has func OwnText() just get node own text, not including their descendants.

@mna
Copy link
Member

mna commented Jun 9, 2019

Hello,

There's no such function, you can use something like what was mentioned in #287 to isolate the text part of the element.

Hope this helps,
Martin

@esrrhs
Copy link
Author

esrrhs commented Jun 10, 2019

ok thanks

@esrrhs esrrhs closed this as completed Jun 10, 2019
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

2 participants