swc/crates/swc_html_parser/tests/fixture/element/custom-element/output.json

606 lines
18 KiB
JSON

{
"type": "Document",
"span": {
"start": 1,
"end": 779,
"ctxt": 0
},
"mode": "quirks",
"children": [
{
"type": "Element",
"span": {
"start": 0,
"end": 768,
"ctxt": 0
},
"tagName": "html",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 0,
"end": 168,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [],
"content": null
},
{
"type": "Element",
"span": {
"start": 0,
"end": 768,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 1,
"end": 168,
"ctxt": 0
},
"tagName": "popup-info",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "img",
"value": "img/alt.png"
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "data-text",
"value": "Your card validation code (CVC)\n is an extra security feature — it is the last 3 or 4 numbers on the\n back of your card."
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 181,
"end": 183,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 183,
"end": 214,
"ctxt": 0
},
"tagName": "custom-square",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "l",
"value": "100"
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "c",
"value": "red"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 230,
"end": 232,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 232,
"end": 258,
"ctxt": 0
},
"tagName": "app-drawer",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "open",
"value": null
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "disabled",
"value": null
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 271,
"end": 273,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 273,
"end": 505,
"ctxt": 0
},
"tagName": "share-buttons",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 288,
"end": 293,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 293,
"end": 344,
"ctxt": 0
},
"tagName": "social-button",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "type",
"value": "twitter"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 323,
"end": 344,
"ctxt": 0
},
"tagName": "a",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "href",
"value": "..."
}
],
"children": [
{
"type": "Text",
"span": {
"start": 337,
"end": 344,
"ctxt": 0
},
"value": "Twitter"
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 364,
"end": 369,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 369,
"end": 416,
"ctxt": 0
},
"tagName": "social-button",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "type",
"value": "fb"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 394,
"end": 416,
"ctxt": 0
},
"tagName": "a",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "href",
"value": "..."
}
],
"children": [
{
"type": "Text",
"span": {
"start": 408,
"end": 416,
"ctxt": 0
},
"value": "Facebook"
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 436,
"end": 441,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 441,
"end": 484,
"ctxt": 0
},
"tagName": "social-button",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "type",
"value": "plus"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 468,
"end": 484,
"ctxt": 0
},
"tagName": "a",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "href",
"value": "..."
}
],
"children": [
{
"type": "Text",
"span": {
"start": 482,
"end": 484,
"ctxt": 0
},
"value": "G+"
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 504,
"end": 505,
"ctxt": 0
},
"value": "\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 521,
"end": 523,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 523,
"end": 580,
"ctxt": 0
},
"tagName": "x-foo-with-markup",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 542,
"end": 547,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 547,
"end": 575,
"ctxt": 0
},
"tagName": "b",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 550,
"end": 575,
"ctxt": 0
},
"value": "I'm an x-foo-with-markup!"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 579,
"end": 580,
"ctxt": 0
},
"value": "\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 600,
"end": 602,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 602,
"end": 768,
"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": "x-foo-from-template"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 637,
"end": 642,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 642,
"end": 682,
"ctxt": 0
},
"tagName": "style",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 649,
"end": 682,
"ctxt": 0
},
"value": "\n p { color: green; }\n "
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 690,
"end": 695,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 695,
"end": 763,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 698,
"end": 763,
"ctxt": 0
},
"value": "I'm in Shadow DOM. My markup was stamped from a <template>."
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 767,
"end": 768,
"ctxt": 0
},
"value": "\n"
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
]
}