swc/crates/swc_html_parser/tests/fixture/element/embed/output.json
2022-04-28 17:57:05 +00:00

311 lines
7.8 KiB
JSON

{
"type": "Document",
"span": {
"start": 0,
"end": 374,
"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": 367,
"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": 367,
"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": 169,
"ctxt": 0
},
"tagName": "embed",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "type",
"value": "vide/webm"
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "src",
"value": "/media/examples/flower.mp4"
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "width",
"value": "200"
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "height",
"value": "200"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 169,
"end": 174,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 174,
"end": 225,
"ctxt": 0
},
"tagName": "noembed",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 183,
"end": 225,
"ctxt": 0
},
"value": "\n <h1>Alternative content</h1>\n "
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 235,
"end": 240,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 240,
"end": 358,
"ctxt": 0
},
"tagName": "embed",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "type",
"value": "video/webm"
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "src",
"value": "/media/cc0-videos/flower.mp4"
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "width",
"value": "250"
},
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "height",
"value": "200"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 358,
"end": 367,
"ctxt": 0
},
"value": "\n\n"
}
],
"content": null
}
],
"content": null
}
]
}