swc/crates/swc_html_parser/tests/fixture/element/p/output.json
2022-04-28 17:27:39 +00:00

361 lines
9.8 KiB
JSON

{
"type": "Document",
"span": {
"start": 0,
"end": 229,
"ctxt": 0
},
"mode": "no-quirks",
"children": [
{
"type": "DocumentType",
"span": {
"start": 0,
"end": 15,
"ctxt": 0
},
"name": "html",
"publicId": null,
"systemId": null
},
{
"type": "Element",
"span": {
"start": 16,
"end": 222,
"ctxt": 0
},
"tagName": "html",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "lang",
"value": "en"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 33,
"end": 68,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 39,
"end": 44,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 44,
"end": 59,
"ctxt": 0
},
"tagName": "title",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 51,
"end": 59,
"ctxt": 0
},
"value": "Document"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"value": "\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 76,
"end": 222,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 82,
"end": 83,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 83,
"end": 90,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 86,
"end": 90,
"ctxt": 0
},
"value": "Test"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 94,
"end": 95,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 95,
"end": 117,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 98,
"end": 117,
"ctxt": 0
},
"value": "\n Test\n Test\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 121,
"end": 122,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 122,
"end": 129,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 125,
"end": 129,
"ctxt": 0
},
"value": "One\n"
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 129,
"end": 137,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 132,
"end": 137,
"ctxt": 0
},
"value": "Two\n\n"
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 137,
"end": 183,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 140,
"end": 183,
"ctxt": 0
},
"tagName": "object",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 148,
"end": 155,
"ctxt": 0
},
"tagName": "param",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [],
"content": null
},
{
"type": "Element",
"span": {
"start": 155,
"end": 183,
"ctxt": 0
},
"tagName": "ins",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 160,
"end": 183,
"ctxt": 0
},
"tagName": "map",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 165,
"end": 183,
"ctxt": 0
},
"tagName": "a",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "href",
"value": "/"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 177,
"end": 183,
"ctxt": 0
},
"value": "Apples"
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 212,
"end": 222,
"ctxt": 0
},
"value": "\n\n\n"
}
],
"content": null
}
],
"content": null
}
]
}