swc/crates/swc_html_parser/tests/fixture/element/select/output.json

504 lines
14 KiB
JSON
Raw Normal View History

{
"type": "Document",
"span": {
"start": 1,
"end": 388,
"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": 0,
2022-06-07 17:33:06 +03:00
"end": 0,
"ctxt": 0
},
"tagName": "html",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 0,
2022-06-07 17:33:06 +03:00
"end": 0,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [],
"content": null
},
{
"type": "Element",
"span": {
"start": 0,
2022-06-07 17:33:06 +03:00
"end": 0,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 17,
"end": 74,
"ctxt": 0
},
"tagName": "select",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 25,
"end": 45,
"ctxt": 0
},
"tagName": "option",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 33,
"end": 36,
"ctxt": 0
},
"value": "foo"
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 45,
"end": 65,
"ctxt": 0
},
"tagName": "option",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 53,
"end": 56,
"ctxt": 0
},
"value": "bar"
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 75,
"end": 114,
"ctxt": 0
},
"tagName": "select",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 83,
"end": 94,
"ctxt": 0
},
"tagName": "option",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 91,
"end": 94,
"ctxt": 0
},
"value": "foo"
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 94,
"end": 105,
"ctxt": 0
},
"tagName": "option",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 102,
"end": 105,
"ctxt": 0
},
"value": "bar"
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 114,
"end": 115,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 115,
"end": 143,
"ctxt": 0
},
"tagName": "select",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 123,
"end": 134,
"ctxt": 0
},
"tagName": "option",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 131,
"end": 134,
"ctxt": 0
},
"value": "foo"
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 143,
"end": 144,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 144,
"end": 214,
"ctxt": 0
},
"tagName": "select",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 152,
"end": 153,
"ctxt": 0
},
"value": " "
},
{
"type": "Element",
"span": {
"start": 153,
"end": 173,
"ctxt": 0
},
"tagName": "option",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 161,
"end": 164,
"ctxt": 0
},
"value": "foo"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 173,
"end": 174,
"ctxt": 0
},
"value": " "
},
{
"type": "Element",
"span": {
"start": 174,
"end": 194,
"ctxt": 0
},
"tagName": "option",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 182,
"end": 185,
"ctxt": 0
},
"value": "bar"
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 194,
"end": 205,
"ctxt": 0
},
"tagName": "option",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 202,
"end": 205,
"ctxt": 0
},
"value": "foo"
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 214,
"end": 215,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 215,
"end": 388,
"ctxt": 0
},
"tagName": "select",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 223,
"end": 287,
"ctxt": 0
},
"tagName": "optgroup",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 233,
"end": 248,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "label",
"value": "Group 1"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 249,
"end": 276,
"ctxt": 0
},
"tagName": "option",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 257,
"end": 267,
"ctxt": 0
},
"value": "Option 1.1"
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 287,
"end": 288,
"ctxt": 0
},
"value": " "
},
{
"type": "Element",
"span": {
"start": 288,
"end": 379,
"ctxt": 0
},
"tagName": "optgroup",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 298,
"end": 313,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "label",
"value": "Group 2"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 314,
"end": 341,
"ctxt": 0
},
"tagName": "option",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 322,
"end": 332,
"ctxt": 0
},
"value": "Option 2.1"
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 341,
"end": 368,
"ctxt": 0
},
"tagName": "option",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 349,
"end": 359,
"ctxt": 0
},
"value": "Option 2.2"
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
]
}