mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
This method puts the given node and all of its sub-tree into a normalized form. A normalized sub-tree has no empty text nodes and no adjacent text nodes.
8 lines
313 B
Plaintext
8 lines
313 B
Plaintext
Document fragment initial text: 12, child nodes: 3
|
|
Element initial text: 34, child nodes: 2
|
|
Element text after document.normalize(): 34, child nodes: 2
|
|
Document fragment text after documentFragment.normalize(): 1234, child nodes: 2
|
|
Text node 1 data: 12
|
|
Text node 2 data: 2
|
|
Text node 3 data: 34
|
|
Text node 4 data: 4 |