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

InnerHTML #65

Open
ewen-lbh opened this issue Oct 24, 2020 · 0 comments
Open

InnerHTML #65

ewen-lbh opened this issue Oct 24, 2020 · 0 comments

Comments

@ewen-lbh
Copy link

ewen-lbh commented Oct 24, 2020

Is there any way to get the equivalent of .HTML(), but excluding the element's own markup (just like JS' .innerHMTL), without having to resort to regex?

An example:

element.HTML() yields <p><a href="square-cover-art.jpeg">My <em>wacky</em> label with <strong>bold</strong> and <code>code</code> and stuff “hmmm”</a></p>

I want to get <a href="square-cover-art.jpeg">My <em>wacky</em> label with <strong>bold</strong> and <code>code</code> and stuff “hmmm”</a>

I guess I could iterate over element.Children() and concatenate each child's .HTML(), but I think having a .InnerHTML() would make things nicer (and a tad better when it comes to performance I guess)

I'm willing to make a PR :)

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

1 participant