swc/crates/swc_html_parser/tests/recovery/element/template-3/output.json

386 lines
13 KiB
JSON
Raw Normal View History

{
"type": "Document",
"span": {
"start": 1,
"end": 304,
"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": 304,
"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
},
"data": "\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
},
"data": "Document"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"data": "\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"data": "\n"
},
{
"type": "Element",
"span": {
"start": 77,
"end": 297,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"data": "\n"
},
{
"type": "Element",
"span": {
"start": 84,
"end": 288,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 89,
"end": 104,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "tmplParent"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 105,
"end": 282,
"ctxt": 0
},
"tagName": "template",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 115,
"end": 125,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "tmpl1"
}
],
"children": [],
"content": {
"type": "DocumentFragment",
"span": {
"start": 105,
"end": 282,
"ctxt": 0
},
"children": [
{
"type": "Element",
"span": {
"start": 126,
"end": 271,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 131,
"end": 148,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "fosterParent"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 189,
"end": 233,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 194,
"end": 208,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "orphanDiv"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 209,
"end": 227,
"ctxt": 0
},
"data": "Orphan div content"
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 149,
"end": 265,
"ctxt": 0
},
"tagName": "table",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 156,
"end": 164,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "tbl"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 0,
2022-06-07 17:33:06 +03:00
"end": 0,
"ctxt": 0
},
"tagName": "tbody",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 165,
"end": 189,
"ctxt": 0
},
"tagName": "tr",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 169,
"end": 184,
"ctxt": 0
},
"tagName": "td",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 173,
"end": 179,
"ctxt": 0
},
"data": "Cell 1"
}
],
"content": null
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 233,
"end": 257,
"ctxt": 0
},
"tagName": "tr",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 237,
"end": 252,
"ctxt": 0
},
"tagName": "td",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 241,
"end": 247,
"ctxt": 0
},
"data": "Cell 2"
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
]
}
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 288,
"end": 297,
"ctxt": 0
},
"data": "\n\n"
}
],
"content": null
}
],
"content": null
}
]
}