swc/crates/swc_html_parser/tests/fixture/element/img/output.json
2022-07-17 12:48:21 +00:00

229 lines
5.9 KiB
JSON

{
"type": "Document",
"span": {
"start": 1,
"end": 191,
"ctxt": 0
},
"mode": "no-quirks",
"children": [
{
"type": "DocumentType",
"span": {
"start": 1,
"end": 16,
"ctxt": 0
},
"name": "html",
"publicId": null,
"systemId": null,
"raw": "<!DOCTYPE html>"
},
{
"type": "Element",
"span": {
"start": 17,
"end": 191,
"ctxt": 0
},
"tagName": "html",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [],
"content": null,
"isSelfClosing": false
},
{
"type": "Element",
"span": {
"start": 24,
"end": 191,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 30,
"end": 32,
"ctxt": 0
},
"data": "\n\n",
"raw": "\n\n"
},
{
"type": "Element",
"span": {
"start": 32,
"end": 52,
"ctxt": 0
},
"tagName": "h2",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 36,
"end": 47,
"ctxt": 0
},
"data": "HTML Images",
"raw": "HTML Images"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 52,
"end": 53,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 53,
"end": 101,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 56,
"end": 97,
"ctxt": 0
},
"data": "HTML images are defined with the img tag:",
"raw": "HTML images are defined with the img tag:"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 101,
"end": 103,
"ctxt": 0
},
"data": "\n\n",
"raw": "\n\n"
},
{
"type": "Element",
"span": {
"start": 103,
"end": 173,
"ctxt": 0
},
"tagName": "img",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 108,
"end": 127,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "src",
"rawName": "src",
"value": "w3schools.jpg",
"rawValue": "\"w3schools.jpg\""
},
{
"type": "Attribute",
"span": {
"start": 128,
"end": 147,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "alt",
"rawName": "alt",
"value": "W3Schools.com",
"rawValue": "\"W3Schools.com\""
},
{
"type": "Attribute",
"span": {
"start": 148,
"end": 159,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "width",
"rawName": "width",
"value": "104",
"rawValue": "\"104\""
},
{
"type": "Attribute",
"span": {
"start": 160,
"end": 172,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "height",
"rawName": "height",
"value": "142",
"rawValue": "\"142\""
}
],
"children": [],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 173,
"end": 191,
"ctxt": 0
},
"data": "\n\n\n\n",
"raw": "\n\n\n\n"
}
],
"content": null,
"isSelfClosing": false
}
],
"content": null,
"isSelfClosing": false
}
]
}