-
-
Notifications
You must be signed in to change notification settings - Fork 236
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 a serialization mode that mimics outerHTML #230
Labels
Comments
I've implemented this in #347. For anyone looking for a workaround, here's how you can serialize outerHTML without my new code: import Serializer from 'parse5/lib/serializer/index.js'
function serializeOuterHTML() {
const serializer = new Serializer()
serializer._serializeElement(node)
return serializer.html
} |
@fb55 following up from #347 (comment), what would you prefer the name of the new method be? Maybe |
joeldenning
added a commit
to joeldenning/parse5
that referenced
this issue
Jan 13, 2022
|
fb55
added a commit
to parse5/parse5-fork
that referenced
this issue
Jan 18, 2022
Fixes inikulin#230, inikulin#378 Uses the test case from inikulin#378, by @joeldenning Co-Authored-By: Joel Denning <[email protected]>
fb55
added a commit
to parse5/parse5-fork
that referenced
this issue
Feb 7, 2022
Fixes inikulin#230, inikulin#378 Uses the test case from inikulin#378, by @joeldenning Co-Authored-By: Joel Denning <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That is, it should include the node itself.
Currently in jsdom we have to create a fake parent node with only one child node, the node we want to serialize, and then ask parse5 to serialize that.
The text was updated successfully, but these errors were encountered: