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

Add method Elements.before(Node node) #953

Open
AnaelMobilia opened this issue Oct 15, 2017 · 4 comments
Open

Add method Elements.before(Node node) #953

AnaelMobilia opened this issue Oct 15, 2017 · 4 comments
Labels
improvement An improvement / new feature idea

Comments

@AnaelMobilia
Copy link

Hello,

We can made Element.before(Node node), Element.before(String html) and Elements.before(String html) .

Is it possible to add Elements.before(Node node) ?
Actually, I need to do myElements.before(myElement.outerHtml()) which isn't really pretty...

Regards,
Anael

@jhy
Copy link
Owner

jhy commented Oct 15, 2017

Hi -- can you describe your use case or show an example? Just want to make sure I understand the request completely.

@AnaelMobilia
Copy link
Author

AnaelMobilia commented Oct 16, 2017

Hello,

I found an element an the webpage. (eg <p>Warning : remote link</p>)
I want to insert it before all div[class=specific] elements.

I need to output my element to HTML to add it before each selected div.
IMHO, it could be great to insert it as an element (and don't needing to put it on html)

Regards,
Anael

@HcPlu
Copy link

HcPlu commented May 25, 2020

I am trying to do likeElement to solve it

@jhy jhy added the improvement An improvement / new feature idea label Jul 12, 2021
@jhy
Copy link
Owner

jhy commented Jul 12, 2021

Should do this for before, after, prepend, append, to match the Elements string methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement An improvement / new feature idea
Projects
None yet
Development

No branches or pull requests

3 participants