swc/crates/swc_html_parser/tests/fixture/attribute/basic/output.json
2022-07-09 04:19:14 +00:00

969 lines
26 KiB
JSON
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"type": "Document",
"span": {
"start": 1,
"end": 499,
"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": 499,
"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 ",
"raw": "\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",
"raw": "Document"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 77,
"end": 499,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 83,
"end": 85,
"ctxt": 0
},
"data": "\n\n",
"raw": "\n\n"
},
{
"type": "Element",
"span": {
"start": 85,
"end": 164,
"ctxt": 0
},
"tagName": "a",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 88,
"end": 89,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "0",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 90,
"end": 91,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "1",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "2",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 94,
"end": 95,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "3",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 96,
"end": 97,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "4",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "5",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 100,
"end": 101,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "6",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 102,
"end": 103,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "7",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "8",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 106,
"end": 107,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "9",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 108,
"end": 109,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "a",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 110,
"end": 111,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "b",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 112,
"end": 113,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "c",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 114,
"end": 115,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "d",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 116,
"end": 117,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "e",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 118,
"end": 119,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "f",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "g",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 122,
"end": 123,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "h",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 124,
"end": 125,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "i",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 126,
"end": 127,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "j",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "k",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 130,
"end": 131,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "l",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 132,
"end": 133,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "m",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 134,
"end": 135,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "n",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 136,
"end": 137,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "o",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 138,
"end": 139,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "p",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 140,
"end": 141,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "q",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 142,
"end": 143,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "r",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 144,
"end": 145,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "s",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 146,
"end": 147,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "t",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 148,
"end": 149,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "u",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 150,
"end": 151,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "v",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 152,
"end": 153,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "w",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 154,
"end": 155,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "x",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 156,
"end": 157,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "y",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "z",
"value": null
}
],
"children": [],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 164,
"end": 165,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 165,
"end": 213,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 168,
"end": 207,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "title",
"value": " <![CDATA[ \\n\\n foobar baz ]]> "
}
],
"children": [
{
"type": "Text",
"span": {
"start": 208,
"end": 209,
"ctxt": 0
},
"data": "x",
"raw": "x"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 213,
"end": 214,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 214,
"end": 253,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 217,
"end": 247,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "title",
"value": " <!-- hello world --> "
}
],
"children": [
{
"type": "Text",
"span": {
"start": 248,
"end": 249,
"ctxt": 0
},
"data": "x",
"raw": "x"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 253,
"end": 254,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 254,
"end": 299,
"ctxt": 0
},
"tagName": "tag",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 259,
"end": 270,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "v-ref:vm_pv",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 271,
"end": 292,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": ":imgs",
"value": " objpicsurl_ "
}
],
"children": [],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 299,
"end": 300,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 300,
"end": 335,
"ctxt": 0
},
"tagName": "br",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 304,
"end": 312,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "a",
"value": "\\u00A0"
},
{
"type": "Attribute",
"span": {
"start": 313,
"end": 323,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "b",
"value": " "
},
{
"type": "Attribute",
"span": {
"start": 324,
"end": 334,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "c",
"value": "\\u00A0"
}
],
"children": [],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 335,
"end": 336,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 336,
"end": 396,
"ctxt": 0
},
"tagName": "img",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 349,
"end": 393,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "src",
"value": "test"
}
],
"children": [],
"content": null,
"isSelfClosing": true
},
{
"type": "Text",
"span": {
"start": 396,
"end": 398,
"ctxt": 0
},
"data": "\n\n",
"raw": "\n\n"
},
{
"type": "Element",
"span": {
"start": 398,
"end": 416,
"ctxt": 0
},
"tagName": "img",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 403,
"end": 415,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "src",
"value": "test.jpg"
}
],
"children": [],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 416,
"end": 417,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 417,
"end": 453,
"ctxt": 0
},
"tagName": "img",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 422,
"end": 434,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "src",
"value": "test.jpg"
},
{
"type": "Attribute",
"span": {
"start": 435,
"end": 452,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "data-src",
"value": "test.jpg"
}
],
"children": [],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 453,
"end": 455,
"ctxt": 0
},
"data": "\n\n",
"raw": "\n\n"
},
{
"type": "Element",
"span": {
"start": 455,
"end": 481,
"ctxt": 0
},
"tagName": "button",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 463,
"end": 471,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "disabled",
"value": null
}
],
"children": [],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 481,
"end": 499,
"ctxt": 0
},
"data": "\n\n\n\n",
"raw": "\n\n\n\n"
}
],
"content": null,
"isSelfClosing": false
}
],
"content": null,
"isSelfClosing": false
}
]
}