swc/crates/swc_html_parser/tests/fixture/element/img/output.json
2022-06-14 13:31:23 +00:00

214 lines
5.3 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
},
{
"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"
},
{
"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"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 52,
"end": 53,
"ctxt": 0
},
"data": "\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:"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 101,
"end": 103,
"ctxt": 0
},
"data": "\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",
"value": "w3schools.jpg"
},
{
"type": "Attribute",
"span": {
"start": 128,
"end": 147,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "alt",
"value": "W3Schools.com"
},
{
"type": "Attribute",
"span": {
"start": 148,
"end": 159,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "width",
"value": "104"
},
{
"type": "Attribute",
"span": {
"start": 160,
"end": 172,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "height",
"value": "142"
}
],
"children": [],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 173,
"end": 191,
"ctxt": 0
},
"data": "\n\n\n\n"
}
],
"content": null,
"isSelfClosing": false
}
],
"content": null,
"isSelfClosing": false
}
]
}