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

Replacing cloneDeepWidth with alternative #1506

Closed
TrySound opened this issue Oct 9, 2020 · 2 comments · Fixed by #1564
Closed

Replacing cloneDeepWidth with alternative #1506

TrySound opened this issue Oct 9, 2020 · 2 comments · Fixed by #1564

Comments

@TrySound
Copy link
Contributor

TrySound commented Oct 9, 2020

Here was mentioned new cloneNode api in domhandler. Though it covers only htmlparser2 integration. Is there any similar api in parse5?

cc @fb55

@fb55
Copy link
Member

fb55 commented Oct 17, 2020

Hi @TrySound, the idea was to provide a cloneNode function that also works on parse5's flavor of the htmlparser DOM. Unfortunately, parse5 has two additional properties for attributes that aren't supported by cloneNode right now.

Ultimately, it would be good if parse5's htmlparser2 adapter could actually use domhandler's node interface. @inikulin Is this something you'd be okay with?

@inikulin
Copy link
Contributor

I'm fine with that, though it will be a breaking change and will require a major release

TrySound added a commit to TrySound/parse5 that referenced this issue Nov 4, 2020
fb55 added a commit that referenced this issue Dec 15, 2020
Avoids unnecessary parser calls. Fixes #1166.

Allows us to drop lodash. Fixes #1506.
fb55 added a commit that referenced this issue Dec 20, 2020
Avoids unnecessary parser calls. Fixes #1166.

Allows us to drop lodash. Fixes #1506.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants