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

598 lines
20 KiB
JSON

{
"type": "Document",
"span": {
"start": 0,
"end": 1153,
"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": 1153,
"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": 1153,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 82,
"end": 87,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 87,
"end": 1125,
"ctxt": 0
},
"tagName": "template",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "element-details-template"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 127,
"end": 136,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 136,
"end": 688,
"ctxt": 0
},
"tagName": "style",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 143,
"end": 688,
"ctxt": 0
},
"value": "\n details {font-family: \"Open Sans Light\", Helvetica, Arial, sans-serif }\n .name {font-weight: bold; color: #217ac0; font-size: 120% }\n h4 {\n margin: 10px 0 -8px 0;\n background: #217ac0;\n color: white;\n padding: 2px 6px;\n border: 1px solid #cee9f9;\n border-radius: 4px;\n }\n .attributes { margin-left: 22px; font-size: 90% }\n .attributes p { margin-left: 16px; font-style: italic }\n "
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 696,
"end": 705,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 705,
"end": 1097,
"ctxt": 0
},
"tagName": "details",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 714,
"end": 727,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 727,
"end": 927,
"ctxt": 0
},
"tagName": "summary",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 736,
"end": 753,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 753,
"end": 822,
"ctxt": 0
},
"tagName": "code",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "name"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 772,
"end": 776,
"ctxt": 0
},
"value": "<"
},
{
"type": "Element",
"span": {
"start": 776,
"end": 811,
"ctxt": 0
},
"tagName": "slot",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "name",
"value": "element-name"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 802,
"end": 811,
"ctxt": 0
},
"value": "NEED NAME"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 818,
"end": 822,
"ctxt": 0
},
"value": ">"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 829,
"end": 846,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 846,
"end": 903,
"ctxt": 0
},
"tagName": "i",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "desc"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 862,
"end": 903,
"ctxt": 0
},
"tagName": "slot",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "name",
"value": "description"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 887,
"end": 903,
"ctxt": 0
},
"value": "NEED DESCRIPTION"
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 914,
"end": 927,
"ctxt": 0
},
"value": "\n "
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 937,
"end": 950,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 950,
"end": 1082,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "attributes"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 974,
"end": 991,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 991,
"end": 1005,
"ctxt": 0
},
"tagName": "h4",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 995,
"end": 1005,
"ctxt": 0
},
"value": "Attributes"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1010,
"end": 1027,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 1027,
"end": 1058,
"ctxt": 0
},
"tagName": "slot",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "name",
"value": "attributes"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 1051,
"end": 1058,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1054,
"end": 1058,
"ctxt": 0
},
"value": "None"
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1069,
"end": 1082,
"ctxt": 0
},
"value": "\n "
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1088,
"end": 1097,
"ctxt": 0
},
"value": "\n "
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1107,
"end": 1116,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 1116,
"end": 1120,
"ctxt": 0
},
"tagName": "hr",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 1120,
"end": 1125,
"ctxt": 0
},
"value": "\n "
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1136,
"end": 1153,
"ctxt": 0
},
"value": "\n\n\n"
}
],
"content": null
}
],
"content": null
}
]
}