You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/parser/samples/event-handler/output-v2.json

116 lines
2.0 KiB

{
"hash": "qi54it",
"html": {
"start": 0,
"end": 97,
"type": "Fragment",
"children": [
{
"start": 0,
"end": 61,
"type": "Element",
"name": "button",
"attributes": [
{
"start": 8,
"end": 45,
"type": "EventHandler",
"name": "click",
"expression": {
"type": "CallExpression",
"start": 18,
"end": 44,
"callee": {
"type": "Identifier",
"start": 18,
"end": 21,
"name": "set"
},
"arguments": [
{
"type": "ObjectExpression",
"start": 22,
"end": 43,
"properties": [
{
"type": "Property",
"start": 24,
"end": 41,
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 24,
"end": 31,
"name": "visible"
},
"value": {
"type": "UnaryExpression",
"start": 33,
"end": 41,
"operator": "!",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 34,
"end": 41,
"name": "visible"
}
},
"kind": "init"
}
]
}
]
}
}
],
"children": [
{
"start": 46,
"end": 52,
"type": "Text",
"data": "toggle"
}
]
},
{
"start": 61,
"end": 63,
"type": "Text",
"data": "\n\n"
},
{
"start": 63,
"end": 97,
"type": "IfBlock",
"expression": {
"type": "Identifier",
"start": 68,
"end": 75,
"name": "visible"
},
"children": [
{
"start": 78,
"end": 91,
"type": "Element",
"name": "p",
"attributes": [],
"children": [
{
"start": 81,
"end": 87,
"type": "Text",
"data": "hello!"
}
]
}
]
}
]
},
"css": null,
"js": null
}