mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Add new XMLSerializer().serializeToString functionality
This commit is contained in:
parent
9832feddf3
commit
1ffe8f059a
4 changed files with 10 additions and 2 deletions
|
@ -167,7 +167,7 @@ fn rev_children_iter(n: &Node) -> impl Iterator<Item = DomRoot<Node>> {
|
|||
impl SerializationIterator {
|
||||
fn new(node: &Node, skip_first: bool) -> SerializationIterator {
|
||||
let mut ret = SerializationIterator { stack: vec![] };
|
||||
if skip_first || node.is::<DocumentFragment>() {
|
||||
if skip_first || node.is::<DocumentFragment>() || node.is::<Document>() {
|
||||
for c in rev_children_iter(node) {
|
||||
ret.push_node(&*c);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue