swc/crates/swc_html_parser/tests/fixture/element/div/output.json

316 lines
7.7 KiB
JSON
Raw Normal View History

{
"type": "Document",
"span": {
"start": 1,
"end": 197,
"ctxt": 0
},
"mode": "no-quirks",
"children": [
{
"type": "DocumentType",
"span": {
"start": 1,
"end": 16,
"ctxt": 0
},
"name": "html",
"publicId": null,
"systemId": null
},
{
"type": "Element",
"span": {
"start": 17,
"end": 197,
"ctxt": 0
},
"tagName": "html",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 23,
"end": 32,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "lang",
"value": "en"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 34,
"end": 76,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 40,
"end": 45,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 45,
"end": 68,
"ctxt": 0
},
"tagName": "title",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 52,
"end": 60,
"ctxt": 0
},
"value": "Document"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"value": "\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 77,
"end": 190,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 84,
"end": 99,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 89,
"end": 93,
"ctxt": 0
},
"value": "Test"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 99,
"end": 100,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 100,
"end": 114,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 105,
"end": 108,
"ctxt": 0
},
"value": "One"
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 114,
"end": 128,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 119,
"end": 122,
"ctxt": 0
},
"value": "Two"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 129,
"end": 156,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 134,
"end": 150,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 139,
"end": 144,
"ctxt": 0
},
"value": "Three"
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 156,
"end": 157,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 157,
"end": 181,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 162,
"end": 175,
"ctxt": 0
},
"tagName": "h1",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 166,
"end": 170,
"ctxt": 0
},
"value": "Test"
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 181,
"end": 190,
"ctxt": 0
},
"value": "\n\n"
}
],
"content": null
}
],
"content": null
}
]
}