Skip to content

Commit 13e3d75

Browse files
authored
allow duplicates of the same action on an element (#5875)
1 parent abf11bb commit 13e3d75

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

src/compiler/parse/state/tag.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ function read_attribute(parser: Parser, unique_names: Set<string>) {
376376

377377
if (type === 'Binding' && directive_name !== 'this') {
378378
check_unique(directive_name);
379-
} else if (type !== 'EventHandler') {
379+
} else if (type !== 'EventHandler' && type !== 'Action') {
380380
check_unique(name);
381381
}
382382

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<input use:autofocus use:autofocus>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"html": {
3+
"start": 0,
4+
"end": 35,
5+
"type": "Fragment",
6+
"children": [
7+
{
8+
"start": 0,
9+
"end": 35,
10+
"type": "Element",
11+
"name": "input",
12+
"attributes": [
13+
{
14+
"start": 7,
15+
"end": 20,
16+
"type": "Action",
17+
"name": "autofocus",
18+
"modifiers": [],
19+
"expression": null
20+
},
21+
{
22+
"start": 21,
23+
"end": 34,
24+
"type": "Action",
25+
"name": "autofocus",
26+
"modifiers": [],
27+
"expression": null
28+
}
29+
],
30+
"children": []
31+
}
32+
]
33+
}
34+
}

0 commit comments

Comments
 (0)