swc/crates/swc_html_parser/tests/fixture/element/img/output.json
2022-06-02 04:00:32 +00:00

208 lines
5.1 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": 30,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [],
"content": null
},
{
"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
},
"value": "\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
},
"value": "HTML Images"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 52,
"end": 53,
"ctxt": 0
},
"value": "\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
},
"value": "HTML images are defined with the img tag:"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 101,
"end": 103,
"ctxt": 0
},
"value": "\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
},
{
"type": "Text",
"span": {
"start": 173,
"end": 191,
"ctxt": 0
},
"value": "\n\n\n\n"
}
],
"content": null
}
],
"content": null
}
]
}